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

Need Help with Spotify API :)

Need Help with Spotify API :)

I am currently building a project where I have an Express JS server used to make requests to the Spotify API, using the "Authorization Code" method to retrieve user data. I then need to pass this data onto a separate, browser-based Javascript file, to utilize this data. How can I make a request to retrieve this data from the server? It appears that I need the access_token in the link to retrieve the data properly, but I am unsure how I am supposed to update my code, if the access_token changes each time. I am aware of the PKCE method for authorization, but for my purposes, I want to eventually store the user's data long-term in a database within the server.

 

Is there a way to send the access_token to the browser side Javascript? Or is there perhaps another solution? I have attached my current code below. My server is hosted on port 8888, and my browser is hosted on port 5173.

 

Thank you so much in advance for the help :))

Reply
0 Replies

Suggested posts

Type a product name