Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
Coinbase Javascript API not working - Invalid Passphrase

I tried the Coinbase Pro Node javascript library but I am getting Invalid Passphrase coming back from the authenticated endpoint, but the public endpoint works OK. I set the access key, secret key, and passphrase into my environment for my application to use. I have a valid Coinbase Pro account and I created my credentials there.

Does this work for anyone? Since the library is marked deprecated, I want to ensure I am simply not doing something wrong or using a library that doesn't work anymore.

This is my app.

const CoinbasePro = require('coinbase-pro');
const publicClient = new CoinbasePro.PublicClient();

publicClient
    .getProducts()
    .then(data => {
        // console.log(data);
        console.log(`got product data for ${data.length} products`);
    })
    .catch(error => {
        console.log("error", error);
    });

const key = process.env.cb_access_key;
const secret = process.env.cb_secret_key;
const passphrase = process.env.cb_passphrase;

const apiURI = 'https://api.pro.coinbase.com';
const sandboxURI = 'https://api-public.sandbox.pro.coinbase.com';

const authedClient = new CoinbasePro.AuthenticatedClient(
    key,
    secret,
    passphrase,
    apiURI
);

authedClient.getOrders({ after: 3000, status: 'open' }, resp => {
    console.log(resp.data);
});

Response:

$ npm run cb

> coinbase@1.0.0 cb
> node coinbase.js

got product data for 375 products
{ message: 'Invalid Passphrase' }

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Notice how getProducts didn't fail even though the passphrase constant hadn't been set yet? The publicClient doesn't require a passphrase. You can get to any of those endpoints directly in a browser. For example publicClient.getProducts is simply a GET request to https://api.pro.coinbase.com/products.

I've gotten the Invalid Passphrase a couple times on API keys that have been working for days then suddenly stop. I had to delete and recreate the keys and update the code with the new keys. I'm not sure why they keys suddenly break but that is the fix for it if you haven't figured it out yet, I know this is probably a stale question by now.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda