想不通,为什么我得到 403 [英] Cant figure out, why i get a 403
问题描述
我尝试设置 youtube api,但收到 403.
i try to setup the youtube api but i get a 403.
我尝试了几次设置 - 没有成功.
I tried to setup several times- without success.
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&id=-DIJvggBrg8&key=xyz
也许有人可以帮助我,甚至可以登录控制台进行设置?
Maybe someone is able to help me or even login to the console for a setup?
推荐答案
403 错误本身并不能立即使用.它附加的错误代码(正如我已经指出的以上) 阐明发生的事情.
The 403 error by itself is not of immediate use. Its attached error code (as I already pointed out above) sheds light on the things that happened.
API 会响应您使用文本(以 JSON 格式构建)所做的任何查询.该响应文本包含所需的错误代码.
The API responds to any query you make with a text (that is structured in JSON format). That response text contains the needed error code.
我建议您继续执行以下步骤:
I suggest you to proceed with the following steps:
- 删除旧的 API 密钥(现在它仍然可以访问!);
- 创建一个新的 API 密钥并
- 使用新密钥运行您的 API 查询,然后在此处发布 API 响应文本.
请注意,我检查了您的查询所指的视频 -DIJvggBrg8使用我自己的 API 密钥,没有错误,但有描述视频的 JSON 文本.
Note that I checked the video -DIJvggBrg8 to which your query refers to with my own API key and got no error but a JSON text describing the video.
这篇关于想不通,为什么我得到 403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!