[GH-ISSUE #622] [Issue]: Spotify DJ playlist feature lacks playlist write OAuth scopes #290

Closed
opened 2026-10-20 17:27:12 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cha1latte on GitHub (May 9, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/622

Summary

Spotify DJ playlist creation/editing appears to fail because the Spotify OAuth flow does not request playlist write permissions. The current hardcoded scope list in packages/server/src/routes/spotify-auth.routes.ts includes playback/read scopes, but not playlist-modify-private or playlist-modify-public.

Expected behavior

When the Spotify DJ playlist feature creates or updates a Spotify playlist, the connected Spotify token should include the required playlist modification scope(s), so Spotify accepts the request after the user completes OAuth.

Actual behavior

The OAuth flow only requests the existing limited scopes:

user-modify-playback-state
user-read-playback-state
playlist-read-private
user-library-read

Because playlist-modify-private and playlist-modify-public are not requested, Spotify can return 403 for playlist create/edit calls. Disconnecting and reconnecting Spotify does not fix this because the reconnect grants the same limited scope list again.

Steps to reproduce

  1. Pull the latest Marinara Engine main branch.
  2. Connect or reconnect a Spotify account through the Spotify DJ agent OAuth flow.
  3. Use the new Spotify DJ playlist feature that creates or edits a playlist.
  4. Observe the playlist operation fail due to missing Spotify playlist modification permissions.

Environment

  • Marinara Engine version: 936d0f5
  • Install type: source
  • OS + version: Win 11
  • Browser or app shell: Browser

Logs, screenshots, or video

Discord report context only; no uploadable screenshots or logs were provided.

Relevant local code observation:

  • packages/server/src/routes/spotify-auth.routes.ts defines SPOTIFY_SCOPES with playback/read scopes.
  • playlist-modify-private and playlist-modify-public are not present in the route file.

Additional context

The Discord report noted that /api/spotify/dj-mari-playlist was not visible in the fetched Spotify route file, so the playlist endpoint may live elsewhere or in newer code. The auth route still appears to be missing the playlist-write scopes needed by Spotify for playlist creation/editing.

Suggested fix: add the required playlist modification scope(s) to the Spotify OAuth scope list, then instruct users to disconnect/reconnect Spotify so their refreshed grant includes the new permissions.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 9, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/622 ## Summary Spotify DJ playlist creation/editing appears to fail because the Spotify OAuth flow does not request playlist write permissions. The current hardcoded scope list in `packages/server/src/routes/spotify-auth.routes.ts` includes playback/read scopes, but not `playlist-modify-private` or `playlist-modify-public`. ## Expected behavior When the Spotify DJ playlist feature creates or updates a Spotify playlist, the connected Spotify token should include the required playlist modification scope(s), so Spotify accepts the request after the user completes OAuth. ## Actual behavior The OAuth flow only requests the existing limited scopes: ```text user-modify-playback-state user-read-playback-state playlist-read-private user-library-read ``` Because `playlist-modify-private` and `playlist-modify-public` are not requested, Spotify can return 403 for playlist create/edit calls. Disconnecting and reconnecting Spotify does not fix this because the reconnect grants the same limited scope list again. ## Steps to reproduce 1. Pull the latest Marinara Engine main branch. 2. Connect or reconnect a Spotify account through the Spotify DJ agent OAuth flow. 3. Use the new Spotify DJ playlist feature that creates or edits a playlist. 4. Observe the playlist operation fail due to missing Spotify playlist modification permissions. ## Environment - Marinara Engine version: 936d0f5 - Install type: source - OS + version: Win 11 - Browser or app shell: Browser ## Logs, screenshots, or video Discord report context only; no uploadable screenshots or logs were provided. Relevant local code observation: - `packages/server/src/routes/spotify-auth.routes.ts` defines `SPOTIFY_SCOPES` with playback/read scopes. - `playlist-modify-private` and `playlist-modify-public` are not present in the route file. ## Additional context The Discord report noted that `/api/spotify/dj-mari-playlist` was not visible in the fetched Spotify route file, so the playlist endpoint may live elsewhere or in newer code. The auth route still appears to be missing the playlist-write scopes needed by Spotify for playlist creation/editing. Suggested fix: add the required playlist modification scope(s) to the Spotify OAuth scope list, then instruct users to disconnect/reconnect Spotify so their refreshed grant includes the new permissions. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:27:12 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#290
No description provided.