Plan
Premium
Country
USA
Operating System
Mac OS Catalina
I have a question related to the Spotify Web API. I am working on a small script in Python to create a playlist of random tracks. I have gone through the Authentication flow and used the refresh token to get an access token. This access token has been double checked with proper scopes to create a playlist (playlist-modify-public and private). I have tried to use the same inputs (user_id and auth token) on the web console and it is able to create a playlist. However, when I try through my script, I am returned this 403 error: {'error': {'status': 403, 'message': 'You cannot create a playlist for another user.'}}. The Web API endpoint: https://developer.spotify.com/console/post-playlists/
To recap, I have double checked my scopes and tried it on the web console. It is not working when I make the POST request. Are there any suggestions on what I could try next or is this an issue being seen by others?
Thanks!
Hey @tyleryun1, thanks for reaching out here!
That's odd. You should be able to create playlists for the authenticated user. Let's see, could you make sure the 'user-id' parameter is exactly the same as the 'id' you get from the Get Current User's Profile-endpoint? That might work here. Let me know how you get on!
Have a good one,
Hubo