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


基础教程推荐
- 直接将值设置为滑块 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01