I checked multiple times the code, and everything looks correct in relation to the official docs at API Key Authentication, still, I get the error, this is the code:
Hello @schiocco. Welcome to the forum! For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!
I want to mention that this issue is blocking us from adding Coinbase as the leading provider for our software Boxcoin (https://boxcoin.dev/). We successfully implemented Gemini for now (it worked immediately and with the same key authentication logic).
Boxcoin was released a few months ago and already has hundreds of sales.
I’m shocked that after 10 days no one solve this bug on the official API. And no one replies.
A multi-billion dollar company unable to provide a basic support level.
I will continue to post here multiple times till I get an answer.
And all of this without taking in consideration that this seem a Coinbase bug with is even more shocking.
@schiocco we appreciate your passion for the space and the desire to use our products. While we have a team monitoring the forum, we are hoping to get other contributors to participate as well. It is a process.
A few questions for you in hopes of finding a resolution:
Have you tried /api/v2/user as request path?
Are you using the /v2/time endpoint for the time generate, other than using the standard epoch time in seconds?
We see you’re using the time endpoint to generate the timestamp. For the timestamp, have you tried to remove the json_decode, and replace it with Math.floor(Date.now() / 1000); instead?
Lastly, have you tried to convert the HMAC to decimal string when generating the signature?
This is legacy code and we are working with the right teams to ensure it gets updated. That said, your negativity won’t help in getting issues resolved. Persistent and firm kindness is your best bet as we hope to build this community over time
I don’t know what you mean, anyway I think yes because the URL is “https://api.coinbase.com/v2/time”, but I don’t understand why you are asking it if you have the code, just confused.
The code you posted “Math.floor(Date.now() / 1000);” is a JS code. I’m using PHP, anyway I already tried with it using the PHP “time()” function.
I don’t know what you mean for “convert the HMAC to decimal string”, are you referring to hexadecimal? Anyway the PHP function I posted already does it.
Anyway I tried some changes, I always get “invalid signature”, this is a bug of Coinbase (and yes, this quite is shocking).
Unfortunately, your code is not working for me. I get the same invalid signature error. I tried with time() and the coinbase time, I tried on 2 servers (localhost and a live server) and same error, so the issue is not my cURL but with Coinbase. Maybe my key is not correct? Here it is:
@schiocco - Your passive aggressive approach here wont help. The company just closed Q3 and has this week off for recharge. The team assisting with the errors you are seeing will be back on line next week.