Announcements

Help Wizard

Step 1

NEXT STEP

Create Playlist endpoint returning a 403 error

Solved!

Create Playlist endpoint returning a 403 error

I am using the oauth flow with refresh_token and access_token, with the following scopes: 

'user-read-private user-library-read playlist-read-private playlist-modify-private playlist-modify-public playlist-read-collaborative'
 
I was able to successfully call the endpoint with a curl, then deleted the playlist on the Spotify mac app. I am trying to call it programmatically and keep getting a 403. 
 
Any suggestions would be much appreciated.
Reply

Accepted Solutions
Marked as solution

Did you check to see if the request returns a body with an error message?

 

Also, post the full URL and body data that you are sending.

View solution in original post

4 Replies

Post the code where you call it programatically.

 

Here is the code: https://github.com/goudete/PlaylistGenerator/blob/master/endpoints/playlists/createPlaylists.js#L17

 

Please let me know if you need additional information.

Thanks,

Enrique

Marked as solution

Did you check to see if the request returns a body with an error message?

 

Also, post the full URL and body data that you are sending.

I think I found the problem: 

I am sending the wrong user id in the query string. Instead of sending the spotify user id, I am sending my own user id.

 

Thanks for the help!

Suggested posts