Error: REST API requests are not allowed in this domain

Suddenly, without any changes to the code whatsoever, my Advanced Trade API requests started returning the following error:

[error] => unknown
[error_details] => REST API requests are not allowed in this domain. Send requests to https://api.coinbase.com instead.
[message] => REST API requests are not allowed in this domain. Send requests to https://api.coinbase.com instead.

It seems that up until just now, the API accepted requests for endpoints that both included “/api/” and didn’t include it in the URL, but from now on, apparently only endpoints that explicitly include “/api/” are accepted. For example:

Correct: https://api.coinbase.com/api/v3/brokerage/orders/
Incorrect: https://api.coinbase.com/v3/brokerage/orders/

Hope it helps anyone else who may have encountered this. Luckily I had some requests using it and some requests not using it, so I was able to deduct the culprit “easily” (after several hours).

1 Like

ohhhh. was this the issue all along!? My code suddenly wouldn’t send anything and I thought my error protecting code wasn’t good enough, so after only a few hours I made it more robust, and the same thing happened yet again. I then checked if my api was disabled for some reason, but it wasn’t. Thank Jesus you helped me out. I appreciate it.

I am so grateful to you @frankincense :face_holding_back_tears:
Their error message is such a trap ! They should change it but I don’t know how to talk to someone from there