I am trying to create a playlist with spotify and the spotipy library in python. However, I keep getting a "No token provided" error when making my API request. However, if I use the same token with a curl request, it works! Can someone please help. This is my code:
This is really frustrating! The authentication is working, otherwise the token wouldn't have been valid for the curl request. I must be doing something wrong with spotipy.
specifically, I was too clever by formatting my query like it appears in the URL of the response (ie: replacing spaces with +'s)
Also, the token was working the whole time, I think I was getting the error because I was attempting to access the search results by clicking the "href" in the response, and in doing was I was hitting the endpoint without providing the right header, which caused me to get the 401 error in my browser.