【问题标题】:Obtaining an access token from a refresh token without knowing the clientid and client secret在不知道 clientid 和 client secret 的情况下从刷新令牌中获取访问令牌
【发布时间】:2016-04-04 11:06:03
【问题描述】:

我有一个刷新令牌(由外部工具生成)和访问数据的目标

GET https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles/~all/goals

通过 C# 。为此,我需要生成访问令牌。这甚至可能在不知道客户端 ID 和客户端密码的情况下实现吗?

【问题讨论】:

    标签: c# google-api google-oauth


    【解决方案1】:

    要使用刷新令牌检索访问令牌,您必须知道创建它的客户端 ID 和密码。

    你会做一个 HTTP Post 到以下

    https://accounts.google.com/o/oauth2/token client_id={ClientId}.apps.googleusercontent.com&client_secret={ClientSecret}&refresh_token=1/ffYmfI0sjR54Ft9oupubLzrJhD1hZS5tWQcyAvNECCA&grant_type=refresh_token

    【讨论】:

      猜你喜欢
      • 2013-08-15
      • 1970-01-01
      • 2017-03-22
      • 1970-01-01
      • 2016-06-15
      • 2015-01-08
      • 2019-09-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多