Help Wizard

Step 1

NEXT STEP

API Access token expired

API Access token expired

 

Okay so i started to work with the API but my access token keeps expireting.

 

Am i doing something wrong ?

 

Because it gets really frustrating when you are in the middle of developement and you need to switch the token every hour.

 

Is there any solution to this ? 

 

EDIT:

 

As an exmaple here

https://developer.spotify.com/console/get-playlist/

 

The OAuth Token 

needs to be generated every hour for me to get any response from the api.

 

 

Reply
1 Reply

Hey!

 

The access tokens expire after 1 hour, which is set by Spotify's side and follows OAuth2 Guidelines. You can use the refresh token with your client secret to get new access tokens when your access token expires. This is a security measure. 

 

When you use the authorization code to get your access token, you will also get a refresh token back in the same message. Use that refresh token to request new access tokens, when the access tokens expire.

 

You can refer to this documentation to help

 

Hope this helps!

Suggested posts