Spotify检查access_token是否已过期

sha*_*wok 4 spotify spotify-app

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

GET https://api.spotify.com/v1/me
Run Code Online (Sandbox Code Playgroud)

检查access_token是否过期.

Mic*_*lin 7

没有端点可以检查令牌到期之前剩余的时间,但您可以使用对访问令牌请求的响应来查找.

如" Web API授权指南"中所述,包含访问令牌的响应也包含

expires_in   int    The time period (in seconds) for which the access token is valid. 
Run Code Online (Sandbox Code Playgroud)