【问题标题】:Get information about the user google plus api by token通过token获取用户google plus api的信息
【发布时间】:2017-11-03 19:38:29
【问题描述】:

我使用应用程序 android 并在发出请求时获取令牌: oauth2:server:client_id:xxxxxx.apps.googleusercontent.com:api_scope:profile email openid

之后,我想在 Web 服务器上获取有关此令牌的信息。 我正在尝试使用: https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=xxx

但我无法获取数据,我该如何获取?

【问题讨论】:

    标签: google-oauth google-plus-signin


    【解决方案1】:

    要获得真正的令牌,您需要更正对 url 的请求: https://www.googleapis.com/oauth2/v4/token

    并通过POST方法传递参数: grant_type=authorization_code&client_id=xxxx.apps.googleusercontent.com&client_secret=xxxx&code={code}

    code - 先前获得的类型的令牌 4/xxxxx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-31
      • 1970-01-01
      • 2016-04-12
      • 2017-05-05
      • 2021-02-09
      • 2015-07-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多