Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Confused about access token refresh

Confused about access token refresh

I have an application that simply searches Spotify. It does not retrieve any user data. I believe that this only requires 'client credentials' and does not require a refresh token. Indeed, I have this working (I am using a Java library right now - Spotify Web API Java) to access the API).

 

However, the access token I get apparently expires in one hour anyway.

If this is true, how do I refresh my access? Or do I not need to do that? Very confused.

 

Thanks.

Reply
1 Reply

Yes, you need to get a new token every hour.  You get a new token the same way you got the first, with a Basic authentication query to /api/token using your client id and client secret, as per https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random