I'm trying to use Coinbase's REST API to get a list of available currencies:
Here is the endpoint - https://api.prime.coinbase.com/currencies
You can see the JSON loads when you click the link above.
$coinbase_coins = file_get_contents('https://api.prime.coinbase.com/currencies');
$coinbase_coins = json_decode($coinbase_coins, true);
Now when I try to load it with file_get_contents, I get the error "failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request"
Why is it that I can access the endpoint via browser but now with file_get_contents?
Thanks ;)