Help Wizard

Step 1

NEXT STEP

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.

Suggested posts