Getting Error 403: Access Not Configured. Please use Google Developers Console to activate the API for your project(出现错误 403:未配置访问.请使用 Google Developers Console 为您的项目激活 API)
问题描述
我正在尝试使用 Youtube API 从特定频道中提取所有视频.我在 Google Developers Console 中设置了项目并获得了 API 浏览器密钥.我启用了 YouTube Data API v3,为了安全起见,我启用了 YouTube Analytics API.
I am trying to use the Youtube API to pull in all the videos from a particular channel. I set up the project in Google Developers Console and got an API browser key. I enabled YouTube Data API v3 and for safe measure, I enabled YouTube Analytics API.
我不知道我收到了这个错误.谁能帮帮我.
I do not know what I am getting this error. Can anyone help me.
{
"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."
}
}
我正在使用的代码.它还没有做任何事情,只是尝试获取数据.
Code i'm using. It doesn't do anything yet, just try to fetch the data.
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
}
});
推荐答案
尝试在 Google Developers Console 如果还不是这样的话.
Try setting the "Referers" to "Any referer allowed" for your project (just leave the field empty) in the Google Developers Console if it is not already like that.
为此,请转到您的 Google Developers Console 并打开 API&Auth/Credentials 并单击Edit allowed referers"清空输入字段.
To do this, go to your Google Developers Console and open API & Auth / Credentials and click "Edit allowed referers" empty the input field.
这篇关于出现错误 403:未配置访问.请使用 Google Developers Console 为您的项目激活 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:出现错误 403:未配置访问.请使用 Google Developers Console 为您的项目激活 API


基础教程推荐
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01