Cant access Youtube data api v3

我怕爱的太早我们不能终老 提交于 2019-12-11 16:00:17

问题


I am trying to access data api in order to search for videos based on keyword,,

    SearchListResponse list=search.execute();

But i am getting this exception:

    403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.",
"reason": "accessNotConfigured"
}
],
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}

but i have activated the yputube data api in api console, as well as i have generated an api key which i am using in

    search.setKey("MY_KEY");

Note: i have enabled youtube data api in console for my project, and m using public api key to access this


回答1:


We have to use "browser api key" because execute() method is part of java client api and not android client api



来源:https://stackoverflow.com/questions/24363460/cant-access-youtube-data-api-v3

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