Skip to content

Support Spotify OAuth token refresh (POST /oauth/device/{deviceId}/music/musicprovider/15/token/cs3) #199

@timvw

Description

@timvw

Device trigger

Speaker has an active Spotify session (from a previous Spotify Connect cast or ZeroConf priming). When the access token approaches expiry, the speaker periodically calls this endpoint to refresh it. Observed during active Spotify playback.

Request

POST /oauth/device/000C8AB02519/music/musicprovider/15/token/cs3
Host: <soundcork server>

Originally sent to streamingoauth.bose.com. Since soundcork already intercepts the marge domain, and the speaker derives the OAuth URL from the same base domain, this request arrives at soundcork without any extra DNS configuration.

Expected response

200 OK
Content-Type: application/json
{
  "access_token": "BQ...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "streaming user-read-email user-read-private"
}

Current behavior

404 Not Found — no route defined for /oauth/... paths.

Notes

  • Provider ID 15 = Spotify (matches the provider list from /streaming/sourceproviders)
  • Token type cs3 = Bose credential schema version 3 (token_version_3 in Sources.xml)
  • The speaker firmware manages its own refresh cycle — this is transparent to the user
  • Requires a linked Spotify account with a valid refresh token on the server side
  • Captured via tshark during active Spotify playback on a SoundTouch 20 (firmware 27.0.6)
  • Implementation available in PR Add Spotify support with OAuth intercept and ZeroConf primer #185

Related: #107, #159

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions