Open AccessReferences / Register new user

Register new user

Required scope: user-soa-link

There must be a 1:1 mapping between a Spotify user and a partner user ID (PUID). A Spotify account can only be linked to a single PUID, and vice versa. If the Spotify user has already been linked to the PUID, the entitlements in the request will replace all existing entitlements.

Spotify maintains the source of truth for which user accounts are linked to which partner user accounts. The integration should not attempt to determine this mapping itself. Therefore, whenever a user comes through the account linking flow, the integration should always call this endpoint to register the user. Failing to do so will lead to synchronization issues and ultimately a broken experience for the user.

Finally, in the case of a successful registration, the integration should always redirect the user to the completion_url provided in the response.

Authorization scopes

Request

POST
/register-user

This endpoint requires the payload to be provided as a JWT.

The payload has the following fields:

PropertyTypeRequiredDescription
partner_idstringyesPartner ID
partner_user_idstringyesPartner User ID
entitlementsarray[string]N/Ayes

Response

A successful response will have HTTP status code 200 and the body will contain a json payload providing the url that the user must be directed to in order to complete the linking process.

  • completion_url
    string

    The spotify.com page that the user must be redirected to complete the account linking flow

Response sample

{  "completion_url": "https://spotify.com/link/"}