Announcements

Help Wizard

Step 1

NEXT STEP

new access token are directly invalid since 1 day

Solved!

new access token are directly invalid since 1 day

Plan: Free
Country: Netherlands
Device: API

I'm using the Spotify API and since about one day the service built on it doesn't work anymore. After some research I figured out that accesstokens are directly invalid. 
 
I'm able to obtain an accesstoken with the client-id, client-secret and refreshtoken.
Which makes me assume that the api should be working. 
 
However, when I do an api call with that token I get directly a 401 (accesstoken invalid). 

I'm clueless, because I didn't change anything on my side and the service worked flawless until about 1 day ago.
Reply

Accepted Solutions
Marked as solution

Thanks for your reply. 

I figured out the error, it seems that accessTokens have a higher character count since a few days (I count 287). My database field to store the token was set to a maximum of 255 characters. 

 

 

View solution in original post

2 Replies

Hey @kasperradio. Access tokens expire after a short while. You can check the validity period of your access token by looking at the expires_in parameter or property that Spotify gives your app when it obtains an access token.

Marked as solution

Thanks for your reply. 

I figured out the error, it seems that accessTokens have a higher character count since a few days (I count 287). My database field to store the token was set to a maximum of 255 characters. 

 

 

Suggested posts