【问题标题】:how to fix google oauth authorization request response 400 (Oauth error) !! 1如何修复 google oauth 授权请求响应 400(Oauth 错误)! 1
【发布时间】:2020-01-12 00:00:04
【问题描述】:

我已在https://accounts.google.com/o/oauth2/v2/auth 上请求获取授权码,但只得到 400 Oauth 错误!! 1. 能否提供请求格式和参数,以便我知道我哪里出错了?

Here is request :
https://accounts.google.com/o/oauth2/v2/auth?scope=https://mail.google.com/&redirect_uri=https://www.msn.com&access_type=offline&client_id=*********.apps.googleusercontent.com&response_type=code&include_granted_scopes=true

【问题讨论】:

    标签: authorization google-oauth


    【解决方案1】:

    您确实意识到这只是您使用的同意网址。之后会有额外的调用。

    这是我用来向用户请求同意书的链接。您只需要更改您的重定向 uri。请记住,在该实例中,响应将返回到重定向 uri。

    获取https://accounts.google.com/o/oauth2/auth?client_id={clientid}.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/analytics.readonly&response_type=code

    Google 3 Legged OAuth2 Flow 窃取的代码

    【讨论】:

    • @DalmTo 用于测试本地邮递员的目的我可以指定什么作为redirect_url?
    • 对于邮递员,您必须进行设置,因为我认为邮递员有自己的重定向 uri。
    猜你喜欢
    • 2021-10-14
    • 2013-07-21
    • 1970-01-01
    • 1970-01-01
    • 2019-07-11
    • 2012-07-14
    • 1970-01-01
    相关资源
    最近更新 更多