Возможно Ваш ключик не подходит.
PHP Warning: file_get_contents(https://www.googleapis.com/youtube/v3/videos?id=YPVXlGY_tAc&key=AIzaSyBA0L0QG8E5eVZlu-GEOeI5Ir3cr54zips&part=contentDetails): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
in php shell code on line 1
Проверьте с того ли IP вы делаете запросы к API
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "ipRefererBlocked",
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
}
}