finnhubio / Finnhub-API

Finnhub API provides institutional-grade financial data to investors, fintech startups and investment firms. We support real-time stock price, global fundamentals and alternative data. https://finnhub.io/docs/api
98 stars 6 forks source link

403 Forbidden #493

Open ertan-atay opened 2 years ago

ertan-atay commented 2 years ago

Hi, I get the following message. Do you know why ?

Fatal error: Uncaught Finnhub\ApiException: [403] Client error: GET https://finnhub.io/api/v1/forex/rates?base=USD&token=XXX resulted in a 403 Forbidden response: {"error":"You don't have access to this resource."} in /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php:10504 Stack trace:

0 /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php(10479): Finnhub\Api\DefaultApi->forexRatesWithHttpInfo('USD', NULL)

1 /index.php(45): Finnhub\Api\DefaultApi->forexRates('USD')

2 {main} thrown in /finnhub.io/vendor/finnhub/client/lib/Api/DefaultApi.php on line 10504

<?php $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKey('token', 'XXX'); $client = new Finnhub\Api\DefaultApi( new GuzzleHttp\Client(), $config ); $client->forexRates("USD"); ?>

Suvrajit69 commented 1 year ago

I also facing this error. Did you solve this in your time?

edwarts commented 12 months ago

I have the error too