我正在使用 youtubei api 在我的应用程序上播放 youtube 视频。有一天视频变得非常慢。我认为 api 密钥 [
AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
] 被滥用了。我试图用我自己的 api 密钥替换它,但它只响应 403 Forbidden YouTube Internal API (InnerTube) has not been used in project
。如何设置我自己的密钥?
我尝试了什么:
网址:https://www.youtube.com/youtubei/v1/player?key=[我的 API 密钥]
回应:
{
"error": {
"code": 403,
"message": "YouTube Internal API (InnerTube) has not been used in project 910740975396 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtubei.googleapis.com/overview?project=910740975396 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"errors": [
{
"message": "YouTube Internal API (InnerTube) has not been used in project 910740975396 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtubei.googleapis.com/overview?project=910740975396 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"domain": "usageLimits",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com"
}
],
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/youtubei.googleapis.com/overview?project=[project id]"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "youtubei.googleapis.com",
"consumer": "projects/[project id]"
}
}
]
}
}