[GH-ISSUE #801] Authentication failing with 403 "Invalid request" error #475

Closed
opened 2026-03-02 23:47:51 +03:00 by kerem · 1 comment
Owner

Originally created by @H4ckN3rd on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/801

Environment

  • OS: Linux (Fedora)
  • spotify-player version: v0.20.7
  • Spotify subscription: Premium (active and verified)

Issue Description

spotify-player fails to authenticate and retrieve any content (playlists, user data, etc.) with consistent 403 errors from Spotify's API.

Image Image

Expected Behavior

  • Should authenticate successfully and display playlists, saved music, etc.
  • Should work with active Spotify Premium account

Actual Behavior

  • Authentication appears to connect to Spotify servers
  • All API requests fail with 403 "Invalid request" errors
  • No content loads (empty playlists, no user data)
  • UI starts but shows no music content

Logs

2025-08-12T17:02:16.384151Z ERROR librespot_core::mercury: error 403 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=[Redacted]&device_id=[Redacted]

2025-08-12T17:02:16.384287Z ERROR spotify_player::client::spotify: Failed to get a new token: failed to get the token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=...", status_code: 403, payload: [[123, 34, 99, 111, 100, 101, 34, 58, 52, 44, 34, 101, 114, 114, 111, 114, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 34, 73, 110, 118, 97, 108, 105, 100, 32, 114, 101, 113, 117, 101, 115, 74, 125]] } }

2025-08-12T17:02:16.384379Z ERROR client_request{request=GetUserSavedShows}: spotify_player::client::handlers: Failed to handle client request: Token is not valid

2025-08-12T17:02:16.384525Z ERROR client_request{request=GetUserFollowedArtists}: spotify_player::client::handlers: Failed to handle client request: Token is not valid

2025-08-12T17:02:16.384535Z ERROR client_request{request=GetCurrentUser}: spotify_player::client::handlers: Failed to handle client request: Token is not valid

Steps to Reproduce

  1. Download spotify-player v0.20.7
  2. Run ./spotify_player authenticate
  3. Complete browser authentication successfully
  4. Run ./spotify_player
  5. Observe empty interface with no content loading

Additional Context

  • Important: This same 403 error now affects other Spotify TUI clients (ncspot) after reinstallation, suggesting a broader Spotify API issue
  • Spotify's official apps work fine with the same Premium account
  • Error payload translates to: {"code":4,"errorDescription":"Invalid request"}
Originally created by @H4ckN3rd on GitHub (Aug 12, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/801 ## Environment - **OS**: Linux (Fedora) - **spotify-player version**: v0.20.7 - **Spotify subscription**: Premium (active and verified) ## Issue Description spotify-player fails to authenticate and retrieve any content (playlists, user data, etc.) with consistent 403 errors from Spotify's API. <img width="1908" height="1023" alt="Image" src="https://github.com/user-attachments/assets/c6d95f18-7e87-4c2c-9d33-d673820750ee" /> <img width="757" height="1023" alt="Image" src="https://github.com/user-attachments/assets/d80e10c3-e09e-41ad-82ea-30b7c9bf9fd8" /> ## Expected Behavior - Should authenticate successfully and display playlists, saved music, etc. - Should work with active Spotify Premium account ## Actual Behavior - Authentication appears to connect to Spotify servers - All API requests fail with 403 "Invalid request" errors - No content loads (empty playlists, no user data) - UI starts but shows no music content ## Logs ``` 2025-08-12T17:02:16.384151Z ERROR librespot_core::mercury: error 403 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=[Redacted]&device_id=[Redacted] 2025-08-12T17:02:16.384287Z ERROR spotify_player::client::spotify: Failed to get a new token: failed to get the token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=...", status_code: 403, payload: [[123, 34, 99, 111, 100, 101, 34, 58, 52, 44, 34, 101, 114, 114, 111, 114, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 34, 73, 110, 118, 97, 108, 105, 100, 32, 114, 101, 113, 117, 101, 115, 74, 125]] } } 2025-08-12T17:02:16.384379Z ERROR client_request{request=GetUserSavedShows}: spotify_player::client::handlers: Failed to handle client request: Token is not valid 2025-08-12T17:02:16.384525Z ERROR client_request{request=GetUserFollowedArtists}: spotify_player::client::handlers: Failed to handle client request: Token is not valid 2025-08-12T17:02:16.384535Z ERROR client_request{request=GetCurrentUser}: spotify_player::client::handlers: Failed to handle client request: Token is not valid ``` ## Steps to Reproduce 1. Download spotify-player v0.20.7 2. Run `./spotify_player authenticate` 3. Complete browser authentication successfully 4. Run `./spotify_player` 5. Observe empty interface with no content loading ## Additional Context - **Important**: This same 403 error now affects other Spotify TUI clients (ncspot) after reinstallation, suggesting a broader Spotify API issue - Spotify's official apps work fine with the same Premium account - Error payload translates to: `{"code":4,"errorDescription":"Invalid request"}`
kerem 2026-03-02 23:47:51 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@H4ckN3rd commented on GitHub (Aug 12, 2025):

Visit #802 for more...Closing this Issue

<!-- gh-comment-id:3180487957 --> @H4ckN3rd commented on GitHub (Aug 12, 2025): Visit #802 for more...Closing this Issue
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
starred/spotify-player#475
No description provided.