Sonos Music API > getSessionId

We recommend that you no longer use getSessionId.

If your integration uses getSessionId, 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
username string The username for the account holder
password string The password for the account holder


Name Type Description
getSessionIdResult string(255) A unique id for the account holder


  • The SOAP header can contain one of two distinct formats in order to authenticate a user. The simplest form is to supply username/password credentials in the header for requests that require user authentication.
  • You can minimize server overhead by using a sessionId as an opaque token that identifies a user. Then use getSessionId to obtain this token. The SOAP header will then contain this sessionId for subsequent message calls instead of a username and password. Because this message does contain sensitive information it is encrypted using SSL.
  • If you are upgrading your implementation from session-based authentication to getAppLink, you must change your implementation of getSessionId to return a Client.AuthTokenExpired SOAP Fault in order to facilitate the upgrade. See Upgrade to OAuth for details.

Sample request

Sample response