Announcements

Help Wizard

Step 1

NEXT STEP

Spotify Web API returns 405 when adding tracks to playlist via POST /playlists/{id}/items

Spotify Web API returns 405 when adding tracks to playlist via POST /playlists/{id}/items

Hello,

I am experiencing a 405 Method Not Allowed error when trying to add tracks to a Spotify playlist through the Web API.

The request is:

POST /v1/playlists/{playlist_id}/items

Request body:
{"uris":["spotify:track:..."]}

The response is:

HTTP 405 Method Not Allowed

Response headers include:

Allow: GET, HEAD, OPTIONS, PUT

Important details:

  • The app is in Development Mode.

  • OAuth authentication succeeds.

  • The access token has these scopes:
    playlist-read-private
    playlist-modify-private
    playlist-modify-public

  • The Spotify user is added to the app's User Management.

  • GET /v1/playlists/{playlist_id} returns HTTP 200.

  • The playlist is owned by the authenticated Spotify user.

  • The playlist is a normal private playlist.

  • The playlist ID is valid.

  • Re-authorizing the Spotify account and generating a new refresh token did not change the result.

  • The same POST request consistently returns 405.

  • The request follows the current Web API documentation, which specifies POST /playlists/{playlist_id}/items for adding playlist items.

  • GitHub Actions is only executing the Python request and is not rewriting the HTTP method or URL.

The unusual part is that the 405 response contains:

Allow: GET, HEAD, OPTIONS, PUT

Could you please confirm whether POST /v1/playlists/{playlist_id}/items is currently working for Development Mode apps, or whether there is a known restriction or server-side issue affecting this endpoint?

Thank you.

Reply
0 Replies

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/ 5 years ago  in Social & Random