Getting HTTP 401 response when trying to create addresses and sending transactions

I’m able to make requests to all other account endpoints successfully but when I make a POST request to https://api.coinbase.com/v2/accounts/:account_id/addresses I get a 401 response with the following error:

[ { id: 'invalid_token', message: 'The access token is invalid' } ]

When I make a GET request to https://api.coinbase.com/v2/accounts/:account_id/addresses the response contains one receive address that I haven’t used before. Is it possible that I’m forced to use previously created receive addresses before being able to create new ones?

I’m also getting 401 responses with the same error when making POST requests to https://api.coinbase.com/v2/accounts/:account_id/transactions.

I’ve completed the OAuth flow with the wallet:addresses:create and wallet:transactions:send permission scopes so not sure why I’m getting this error for both endpoints.

Any help would be appreciated. Thank you.

Hello @antoniofrancisco Welcome to the Developer’s Forum! Thank you for taking interest in trying our Coinbase APIs.

Upon trying the endpoint on our end with the same permission and trying both the GET and POST method, we were able to successfully make the request. Can you try calling the POST method again with a new token and see if you will still get the same error? Please let us know once you are able to try again.

If the issue still persists after trying with a new token, can you provide us the whole step you did when you tried to make the POST and GET requests ?

As for the unused addresses, you will still be able to create new addresses even without using the old addresses.