问题
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