Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda