Access Not Configured Android Google API Key

℡╲_俬逩灬. 提交于 2019-12-09 08:59:07

问题


I am trying to use Youtube Data API v3 to search on android, though when I try to search using my API key i always get this message:

{
 "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."
 }
}

I have the Youtube Data API set to on in my Console. I have been trying to figure this out for hours. Does anyone know what's wrong?


回答1:


A bit mind confusing is that for the YouTube Data API you need to use the browser-key, but for the YouTube Player API (for Android) you need the Android-key.

Using the Android key for the YouTube Data API will not work and result in the error you received.




回答2:


I've finally solved this. I deleted my project and created a new project in the old Cloud Console. I then activated all the APIs I need to use and then went into API Access and there was a key already there. It should say "Key for browser apps (with referers)" and I just used that key, and it works.




回答3:


It's a very late reply but the issue was very hard to detect. I tried a lot of solutions but nothing was working for me. The only solution works in my case is to generate new API_KEY from google API console.



来源:https://stackoverflow.com/questions/21221666/access-not-configured-android-google-api-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!