I'm trying to use the Spotify API with the spotipy.py
python module. I saw a specific example in several places and everyone says it works. this is the code:
CLIENT_ID = '3de0e551d7ad4f53928abdef515150ed'
CLIENT_SECRET = '6c77d106a8e843508bc7569f9a0f8397'
USER = 'd03ueir6zw7k1dyywjc97fee2?si=GVU-LsDRTg2vL5KPMTbfJg'
client_credentials_manager = SpotifyClientCredentials(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
sp.trace = False
plists = sp.user_playlists(USER)
print(plists)
Of course in the original code, I put my real client id and secret.
However, when I run this code I'm getting an API response that says "No Token Provided".
{
"error": {
"status": 401,
"message": "No token provided"
}
}
I know you need to get permissions for some actions, but I thought the client credentials manager takes care of the permissions for me.
How do I make this code work? And what permissions are given to me using the client credentials manager?