Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!