v1

latestOpenAPI 3.1.02026-07-246652306.5 KB
musicServiceAccounts

match

Use the match command in the musicServiceAccounts namespace to get the account ID of a music service user account from the player.

All players in the household return the same accounts. Changes made to a player are automatically replicated throughout the household.

post/households/{householdId}/musicServiceAccounts/match

Request body

userIdHashCodestring required

Opaque hash of the user account. You must use the same algorithm used by your SMAPI server. See getDeviceAuthToken and getUserInfo SMAPI requests for details.

nicknamestring required

The name for the music service account presented to the user when they view their account from the Sonos app.

serviceIdstring required

The unique identifier for the music service. Maximum length of 20 characters.

linkCodestring nullable

(Optional) The link code generated for device authentication. Your SMAPI service can also send this to the player in the getAppLink SMAPI request. The player can send it back in the getDeviceAuthToken SMAPI request.

linkDeviceIdstring nullable

(Optional) Private data associated with the link code to prevent phishing. Like linkCode, also sent in the getAppLink SMAPI request and returned in the getDeviceAuthToken SMAPI request.

Response

See the x-muse-error-codes extension for a list of muse errors that generate this response

userIdHashCodestring nullable

Opaque hash of the user account sent by your service in the match command.

nicknamestring nullable

The name for the music service account presented to the user when they view their account from the Sonos app.

idstring nullable

The account ID for the music service account.

isGuestboolean nullable

Indicates whether the account is a guest account or not. If true, the account is a guest account. If false, it is not.