Authorization API > Refresh Token

Make a POST request to /login/v3/oauth/access to obtain a new access_token from a refresh_token. This requires a client ID and secret. Be sure to pass your client_id and secret to Sonos securely. See Authorize for details.


POST body request parameters

Use the following request parameters in the body. Sonos requires these, unless otherwise stated in the description.

Name Description
refresh_token The refresh token for which you are requesting an access_token.
grant_type The type of access token requested. The value must be refresh_token.

Response parameters

Sonos sends the following response parameters.

Name Description
access_token The token you can use to access the protected resources.
token_type The type of token. The Sonos authorization server only supports a token_type of Bearer.
refresh_token The token that you can use to obtain a new access token if the current access token has expired.
expires_in The time in seconds for which the token will be valid.
scope The allowed scope for the issued token.

Error responses

You may receive the following error response from Sonos.

Response code Error message Description
400 Bad Request invalid_request Invalid refresh token.
400 Bad Request invalid_grant Missing grant_type parameter.
401 Unauthorized invalid_client Failed to get client credentials. This occurs when client_id or secret parameters are missing.
401 Unauthorized Authentication required client id or secret parameters aren’t valid.

Sample requests

Here’s an example of a generic request:

Here’s an example with some sample data:

Here’s an example using curl:


Sample response

Here’s a sample response: