Closed EPauli closed 3 years ago
@EPauli Like explained in the readme doc:
// By default, if the $_SERVER['HTTP_HOST'] header is set,
// it will be used as the `Referer` header. To override
// this setting, set 'use-http-host' to false during
// object construction:
$youtube = new Youtube(config('YOUTUBE_API_KEY'), ['use-http-host' => false]);
its doesn't work sometime, but sometimes its work. That not stabil
Hi, i have the same problem. The identifiers and access seem correctly informed. The $_SERVER['HTTP_HOST'] corresponds to the domain accepted on the API. I don't know where to look...
X-Origin: https://youtube.com
Maybe you can try by adding the header in the function api_get()
, for my application I have to add this header, or I get the error 403.
I'm getting this error message.
Exception: Error 403 Requests from referer are blocked. : forbidden in file /Users/epauli/Sites/laravel.zite.eu/vendor/alaouy/youtube/src/Youtube.php on line 642
I think something has been changed in the YouTube API that makes an referrer required. How can I set an referrer?