Spotify check if access_token is expired
Asked Answered
B

1

5

A small questions. At the moment i'm using Spotify Webapi, and I want to know is there a Web API Endpoint to check if an access_token is expired? At the moment I'm using

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

to check if an access_token is expired.

Benioff answered 5/12, 2014 at 20:6 Comment(0)
H
9

There's no endpoint to check how long time there's left until a token expires, but you can use the response to the access token request to find out.

As explained in the Web API Authorization Guide, the response including the access token also contains

expires_in   int    The time period (in seconds) for which the access token is valid. 
Holystone answered 6/12, 2014 at 21:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.