Having trouble using the "btoa" method to encode the client id and client secret in base64, which are retrieved from the ".env" file. I've also attempted using the Buffer method but encountered an "invalid form" error with Buffer.
Any assistance would be greatly appreciated.
Please see the complete code below:
Code snippet...
Attempting to integrate a custom Spotify player on my website using the provided script to display top tracks.
Encountering an error when running the script for displaying top tracks, link to error image: https://i.sstatic.net/0AhPx.png
Full code for displaying top tracks:
Code snippet...