Need Help with Spotify API :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 :))
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page