Coinbase API trouble

Hi there, I am having trouble authentication for the Coinbase API. The API needs to use a JWT token.

This is the Coinbase API Authentication documentation. My N8N instance is self hosted. In the credentials of the JWT node, I used the Coinbase API key name as public key and the Coinbase API secret as private key. As Algorithm I am using ES256.

What am I doing wrong and would there be a better method to authenticate for the API? Thanks a lot!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Ricky_Wolff, thanks for reaching out and being a part of the community!

Coinbase has a number of API endpoints available and unless you are specifically interested in the Advanced Trade REST API endpoints and WebSocket server channels, that approach you are taking may not be necessary.

If you just want to interact with the Advanced Trade APIs, you may be able to use n8n’s generic OAuth2 credential.

Try this page instead for getting started making authenticated requests: Sign In With Coinbase Oauth2 Integration

Hi Ludwig, thanks for the suggestion. I’ve implemented the OAuth2 method as per your suggestion and it works great. However, the only problem I am having is with the refresh token. After an hour after first connecting it, I get errors that the access code isn’t refreshed. Any idea on how to solve this? I did add my credentials using the n8n OAuth2 functionality.