Youtube api 不确定为什么获取此文件无法打开流:HTTP请求失败!Youtube API中禁止使用HTTP/1.0 403
不确定为什么获取此文件无法打开流:HTTP请求失败!Youtube API中禁止使用HTTP/1.0 403 如果我尝试公共api,它会工作 但是如果我使用服务器ip和referer域。它的显示错误Youtube api 不确定为什么获取此文件无法打开流:HTTP请求失败!Youtube API中禁止使用HTTP/1.0 403,youtube-api,Youtube Api,不确定为什么获取此文件无法打开流:HTTP请求失败!Youtube API中禁止使用HTTP/1.0 403 如果我尝试公共api,它会工作 但是如果我使用服务器ip和referer域。它的显示错误 Warning: file_get_contents(https://www.googleapis.com/youtube/v3/search?part=snippet&order=viewCount&maxResults=5&q=Sydney&key={mykey}
Warning: file_get_contents(https://www.googleapis.com/youtube/v3/search?part=snippet&order=viewCount&maxResults=5&q=Sydney&key={mykey}): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in filepath.php on line 8
有人能帮我吗,我如何解决这个问题
https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=5&order=viewCount&q=Sydney&key={YOUR_API_KEY}
这是正确的请求。我刚刚用我的API密钥做了一个测试,它工作得很好。。。