【问题标题】:linkedin access token oauth_expires_in VS 60 days expirationlinkedin 访问令牌 oauth_expires_in VS 60 天到期
【发布时间】:2013-02-06 02:07:12
【问题描述】:

http://developer.linkedin.com/documents/authentication(部分:刷新访问令牌)

段落说

LinkedIn 访问令牌可在 60 天内刷新

另一方面,它还表示客户端应用程序可以跟踪令牌创建日期并将其与oauth_expires_in value(以秒为单位)进行比较,并在需要时刷新令牌。

但是,当我调用请求令牌端点时,我只得到oauth_expires_in=599(秒)。

当我检索请求令牌时: oauth_token=xxxxx&oauth_token_secret=xxxxx&oauth_callback_confirmed=true&xoauth_request_auth_url=https://api.linkedin.com/uas/oauth/authorize&,这是我得到的回复:oauth_expires_in=599

我没有收到响应访问令牌请求的此类参数: https[://]www[.]linkedin[.]com/uas/oauth/authorize/submit?oauth_token=xxx&oauth_verifier=xxx

有人可以解释一下吗?

P.S.:用 [] 更改了网址,因为由于缺乏声誉,它不允许我发布超过 2 个网址。

TIA。

【问题讨论】:

    标签: oauth linkedin access-token


    【解决方案1】:

    以秒为单位的到期时间是 requestToken 的到期时间,而不是 accessToken 的到期时间。换句话说,如果您在接下来的 599 秒(10 分钟)内没有将该令牌与访问令牌交换,它将过期,您将需要获取新的 requestToken。

    根据linkedin 文档,您收到的 oauth 令牌的有效期为 60 天。我希望这有帮助。

    【讨论】:

      猜你喜欢
      • 2012-05-28
      • 2014-01-22
      • 2019-03-10
      • 2020-02-29
      • 2012-11-04
      • 2012-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多