Announcements

Help Wizard

Step 1

NEXT STEP

403 Errors

Solved!

403 Errors

Hi All,

 

Apologies this is written by Claude, but at least it includes all the relvant data!

 

Problem

 

POST /v1/playlists/{playlist_id}/tracks consistently returns 403 "Forbidden" with no WWW-Authenticate header, even though:

 

The token has all required scopes
The same token successfully creates playlists via POST /v1/me/playlists
The playlist is owned by the authenticated user
The user is registered as a test user in the app's User Management


What works ✓

GET /v1/me → 200 (user: xxxxxx, product: premium)
POST /v1/me/playlists → 201 (playlist created, public: true, owner: xxxxxx)
All read endpoints (search, albums, tracks)


What fails ✗

POST /v1/playlists/{id}/tracks → 403 {"error":{"status":403,"message":"Forbidden"}}
PUT /v1/playlists/{id}/tracks → same 403
Same result from browser (native fetch) and server (Node.js native fetch + node-fetch)
Tried query-param format (?uris=...) — same 403
Tried collaborative private playlist — same 403
Token scopes granted (confirmed from /api/token response):

playlist-modify-private playlist-modify-public user-read-email user-read-private user-top-read

 

Server log showing the inconsistency:

POST /me/playlists → 201 {"public":true,"collaborative":false,"owner":{"id":"xx"}}GET /playlists/{id}?fields=public,collaborative,owner → public:true, owner:xx


POST /playlists/{id}/tracks → 403 {"error":{"status":403,"message":"Forbidden"}}
WWW-Authenticate header: null

Key detail: This functionality worked in an earlier version of the same app with the same client ID.

 

No changes were made to the Spotify Developer Dashboard between then and now.

 

Questions:

What does 403 "Forbidden" with no WWW-Authenticate header mean specifically for POST /playlists/{id}/tracks?


Is there an app-level approval step required for this endpoint that's separate from the standard Development Mode 25-user limit?


If so, how do we request it — I can't find an "Extended Access" option in the dashboard?

 

Thanks!

Reply

Accepted Solutions
Marked as solution

Hi @ragenow99 

Thanks for posting in the Spotify Community!

You are getting this error, because the API has been cleaned up and simplified.

Instead of having one endpoint to get tracks from a playlist and another to get podcast episodes from your playlist, you can now just use /v1/playlists/{id}/items . Note: you are only able to get items from your own (collaborative-) playlists now.
You can see all the changes on this page. Also have a look at this guide to have a clear overview.

I hope this helps clear things up. If you need more help, feel free to ask!

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

2 Replies
Marked as solution

Hi @ragenow99 

Thanks for posting in the Spotify Community!

You are getting this error, because the API has been cleaned up and simplified.

Instead of having one endpoint to get tracks from a playlist and another to get podcast episodes from your playlist, you can now just use /v1/playlists/{id}/items . Note: you are only able to get items from your own (collaborative-) playlists now.
You can see all the changes on this page. Also have a look at this guide to have a clear overview.

I hope this helps clear things up. If you need more help, feel free to ask!

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

That's worked thanks!

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random