问题
The issue started late-morning PT, on March 31, 2020. The server making the API call to Coinbase is hosted on Google App Engine with node.js (GCP). The same cert-connectivity problem to Coinbase also happened a few weeks ago, and lasted for about a day. The cert-connectivity problem went away all by itself at that time. No code changes were made to the server calling the Coinbase API then, or today. The same code has been working for over a year, but was moved to App engine a few months ago. - Has Coinbase been making network changes that would impact cert-authentication to Google Cloud Platform?
回答1:
Coinbase they updated their certificates . Fix: when you initiate the client you can either set strictSSL to false or pass in the new valid certificates.
Set strictSSL to false:
var Client = require('coinbase').Client;
var client = new Client({
apiKey: mykey,
apiSecret: mysecret,
strictSSL: false
});
update cert files (you should be able to export them here - https://baltimore-cybertrust-root.chain-demos.digicert.com/ or try coinbase.com and export there):
var Client = require('coinbase').Client;
var client = new Client({
apiKey: mykey,
apiSecret: mysecret,
caFile: myNewCertFile
});
myNewCertFiles should follow this files format with the updated certs: https://github.com/coinbase/coinbase-node/blob/master/lib/CoinbaseCertStore.js
来源:https://stackoverflow.com/questions/60961069/coinbase-api-client-getaccount-started-returning-error-unable-to-get-loc