我正在尝试使用 YouTube 的 v3 API 创建广播。我的请求如下所示:
curl -H "Authorization: Bearer ******************" -H "Content-type: application/json" -d " {\"snippet\":{\"title\":\"Hello\", \"scheduledStartTime\":\"2014-01-30T00:00:00.000Z\", \"scheduledEndTime\":\"2014-01-31T00:00:00.000Z\"},\"status\":{\"privacyStatus\":\"public\"}}" https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet,status
但我从谷歌得到的回应是这样的:
{
"error": {
"errors": [
{
"domain": "youtube.liveBroadcast",
"reason": "liveBroadcastForbidden",
"message": "Request is not authorized"
}
],
"code": 403,
"message": "Request is not authorized"
}
}
我可以确认我传递的访问令牌是正确的。我在这里做错了什么吗?