These endpoints are in Beta. While we encourage you to build with them, a situation may arise where we need to disable some or all of the functionality and/or change how they work without prior notice. Please report any issues via our GitHub issue tracker.

Endpoint

PUT https://api.spotify.com/v1/me/player/shuffle

Request Parameters

Header Fields

Header Field Value
Authorization Required. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.
The access token must have been issued on behalf of a user.
The access token must have the user-modify-playback-state scope authorized in order to control playback.

Query Parameters

Query Parameter Value
state Required
true : Shuffle user’s playback
false : Do not shuffle user’s playback.
device_id Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.

Response Format

A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.

When performing an action that is restricted, 404 NOT FOUND or 403 FORBIDDEN will be returned together with a player error message. For example, if there are no active devices found, the request will return 404 NOT FOUND response code and the reason NO_ACTIVE_DEVICE, or, if the user making the request is non-premium, a 403 FORBIDDEN response code will be returned together with the PREMIUM_REQUIRED reason.

Example

curl -X PUT "https://api.spotify.com/v1/me/player/shuffle?state=true" -H "Authorization: Bearer {your access token}"

Try it