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
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01