我正在尝试使用Youtube API从特定频道中提取所有视频.我在Google Developers Console中设置了该项目并获得了API浏览器密钥.我启用了YouTube Data API v3,为了安全起见,我启用了YouTube Analytics API.
我不知道我得到了这个错误.谁能帮我.
{
"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."
}
}
Run Code Online (Sandbox Code Playgroud)
代码我正在使用.它还没有做任何事情,只是尝试获取数据.
jQuery.getJSON('https://www.googleapis.com/youtube/v3/channels?part=UncleBens&id=UncleBens&key=AIzaSyDXD80S1mFHH2HSZFxLemkae-_Cl_nY5Xk', function(data){
console.log(data);
for(var i=0; i<data.data.items.length; i++) {
console.log(data.data.items[i].title); // title
console.log(data.data.items[i].description); // description
}
});
Run Code Online (Sandbox Code Playgroud)