我正在使用youtube直播API服务,如本文所述,
https://developers.google.com/youtube/v3/live/registering_an_application#create_project
我希望使用API密钥,而不是OAuth2.0进行通信。但是当我请求时
https://www.googleapis.com/youtube/v3/liveBroadcasts?part=id&broadcastStatus=all&key=[My_App_key]
我总是以结束
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
为什么我被迫使用OAuth而不能使用API Key操作?
LiveBroadcasts:list states at the top that
授权
此请求需要至少获得以下其中一项的授权scopes(阅读有关身份验证和授权的更多信息(。
此方法不能使用公共API密钥,必须使用oauth2进行身份验证。