Google OAuth 请求:错误 400:invalid_request 缺少必需参数:response_type

问题描述 投票:0回答:2

当我向 Google OAuth 端点发出 OAuth 请求 POST 时,我收到 400 错误,指出我缺少 response_type,尽管在请求 url 中明确发送了“response_type=code”:

https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload&access_type=offline&include_granted_scopes=true&state=state1&redirect_uri=https%3A%2F%2Fauth.somedomain.com%2Foauth2%2Ftoken&response_type=code&client_id=12345465634-qle7u44c0j4hjdjvt1fakes9gju4qe71.apps.googleusercontent.com

有什么想法吗?

youtube-api google-oauth
2个回答
0
投票

对于收到此错误的任何人,请尝试切换到隐身浏览器窗口。并登录您在 oauth2 应用程序注册期间验证为测试用户的电子邮件地址。

当您已经登录不属于测试列表的 Google 帐户时,似乎会发生此错误。


© www.soinside.com 2019 - 2024. All rights reserved.