Generate a Bearer token using your client key and client secret for basic authentication.

post/login/v3/oauth/access

Request

  • Base URL
    https://api.sonos.com
  • URL
    https://api.sonos.com/login/v3/oauth/access
  • Auth
    HTTP basic

Query parameters

grant_typestring required

The type of access token requested. The value must be "authorization_code".

codestring required

The authorization code provided by the getAuthCode endpoint.

redirect_uristring required

URI of the site that requested the authorization code. This must match one of the redirect URLs that you provided for your client credentials in the integration manager. This must be a client-side request as the Sonos login service displays Web pages to the user to prompt them to login to their Sonos account and allow your integration to access and control their Sonos household.

Headers

Content-Typestring

Response

200

object required

Changes

    • breaking

      added the new required query request parameter code

    • breaking

      added the new required query request parameter redirect_uri

    • warning

      deleted the query request parameter refresh_token

    • info

      api operation id refreshtoken removed and replaced with createtoken

    • info

      added the new optional header request parameter Content-Type