Android Youtube V3 Simple API 403错误:accessNotConfigured

时间:2014-03-23 13:40:29

标签: java android youtube youtube-api android-youtube-api

在尝试抓取播放列表的简单json提要时,我遇到了此错误。

我不想将Youtube库包含在这么小的片段中,所以我选择手动抓取json:

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key=<API_KEY>&playlistId=<PLAYLIST_ID>

但我一直在接受:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
 }
}
  • 我通过控制台启用了API
  • 我使用了debug.keystore和我的release.keystore
  • 获得了密钥
  • 包名称是正确的,SHA1&#c>
  • 也是如此

1 个答案:

答案 0 :(得分:4)

解决方案

使用键进行浏览器应用而不是Android键。不要忘记使用 https

将引荐来源字段留空。

希望这可以节省其他人一些时间 - 这样可以节省一些时间!

相关问题