key name
and key secret
with your key name and private key. key secret
is a multi-line key and newlines must be preserved to properly parse the key. Do this on one line with \n
escaped newlines, or with a multi-line string.request_path
and request_host or url
variables as needed depending on which endpoint is being targeted.export JWT=...
.PyJWT
and cryptography
.request_path
and request_host
variables as needed depending on which endpoint is being targeted.python main.py
(or whatever your file name is).export JWT=$(python main.py)
.curl -H "Authorization: Bearer $JWT" 'https://api.coinbase.com/api/v3/brokerage/accounts'
libsodium-wrappers
and base64url
libraries.request_path
and url
variables as needed depending on which endpoint is being targeted.node main.js
(or whatever your file name is).export JWT=$(node main.js)
.curl -H "Authorization: Bearer $JWT" 'https://api.coinbase.com/api/v3/brokerage/accounts'
nbf
(Not Before) and exp
(Expiration) claims. Even small discrepancies between server and client clocks can cause tokens to be rejected. Ensure systems are synchronized using a reliable time source, such as NTP.alg
(Algorithm) and kid
(Key ID). Misconfigurations can result in failed verifications. Follow Coinbase guidelines to set these fields accurately.