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

householdIdstringThe Sonos household ID requesting the link code.


Include the response in a deviceLinkCodeResult inside a getDeviceLinkCodeResponse element.

regUrlstringA URL that a user should navigate to in order to complete device authentication. Be sure that this page handles script injection.
linkCodestringThe linkCode generated for device authentication.
showLinkCodebooleanWhether or not the link code should be displayed in the Sonos application UI.
linkDeviceIdstring(Optional) A token that is hidden from the user to prevent token phishing.

Sample request

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">

Sample response

<soap:Envelope xmlns:soap="">
      <getDeviceLinkCodeResponse xmlns="">