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).