Sonos Music API > getDeviceLinkCode

We recommend that you no longer use getDeviceLinkCode.

If your integration uses getDeviceLinkCode, it will continue to work. For new integrations, we recommend that you upgrade to getAppLink. See Add authentication for details.

Sonos makes this request on your secure (https:) endpoint.

Request parameters

Name Type Description
householdId string The Sonos household ID requesting the link code.


Include the response in a deviceLinkCodeResult inside a getDeviceLinkCodeResponse element.

Name Type Description
regUrl string A URL that a user should navigate to in order to complete device authentication. Be sure that this page handles script injection.
linkCode string The linkCode generated for device authentication.
showLinkCode boolean Whether or not the link code should be displayed in the Sonos application UI.
linkDeviceId string (Optional) A token that is hidden from the user to prevent token phishing.

Sample request

Sample response