【问题标题】:Spotify check if access_token is expiredSpotify 检查 access_token 是否过期
【发布时间】:2015-02-04 02:13:17
【问题描述】:

一个小问题。目前我正在使用 Spotify Webapi,我想知道是否有一个 Web API 端点来检查 access_token 是否过期?目前我正在使用

GET https://api.spotify.com/v1/me

检查 access_token 是否过期。

【问题讨论】:

    标签: spotify spotify-app


    【解决方案1】:

    没有端点可以检查距离令牌过期还有多长时间,但您可以使用对访问令牌请求的响应来找出答案。

    正如Web API Authorization Guide 中所解释的,包含访问令牌的响应也包含

    expires_in   int    The time period (in seconds) for which the access token is valid. 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-02
      • 2018-02-11
      • 2019-07-23
      • 2021-12-21
      相关资源
      最近更新 更多