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

Recently played stream

Recently played stream

Plan

Premium 

My Question or Issue

Hi everyone, I am currently building my portfolio in React, and I want to showcase my recently played tracks on it. Is it possible to do so currently?

I have already tried:
https://developer.spotify.com/documentation/web-api/reference/get-recently-played

 

Reply
1 Reply

You can store your generated tokens server-side after your first login. A server-side script can use them to get the information you want to display.

Because an access token is only valid for 1 hour, you'll need to write code that can renew that token with the refresh token. You'll get a new refresh token when it is expired. The old stored tokens need to be replaced with the new once.

XimzendRising Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts