【发布时间】:2020-01-07 17:54:02
【问题描述】:
我正在构建一个用于将视频流式传输到 YouTube 的 Swift 应用程序,但我无法通过 liveBroadcast-insertion 步骤。该应用程序打印出它发出的每个请求的 cURL 表示;这是插入的:
curl "https://www.googleapis.com/youtube/v3/liveBroadcasts?part=id%252CcontentDetails%252Csnippet%252Cstatus&key=<app-key>" \
--request POST \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'\
--data '{"kind":"youtube#liveBroadcast","snippet":{"title":"Simulator","scheduledStartTime":"2019-09-04T18:18:50Z"},"status":{"privacyStatus":"public"}}'
这给了我以下错误响应:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Project <redacted> is not found and cannot be used for API calls. If it is recently created, enable YouTube Data API by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=40586258927 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=<redacted>"
}
],
"code": 403,
"message": "Project <redacted> is not found and cannot be used for API calls. If it is recently created, enable YouTube Data API by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=<Foo> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
}
我不确定 Project <redacted> 的名称从何而来,因为这与我登录的项目不匹配。
我检查了以下 SO 问题,但无济于事:
- youtube analytics api error 403, accessNotConfigured 这个已经 6 岁了,不再有 YouTube Analytics API。我的项目确实启用了 YouTube 数据 API。
- Youtube API key - accessNotConfigured error 我也尝试创建一个全新的 YouTube 项目,但没有成功。
- 等。
【问题讨论】:
标签: youtube youtube-api youtube-data-api youtube-livestreaming-api