Skip to content
DocumentationAPI Reference

Toggle Playback Shuffle

me.player.toggle_shuffle(PlayerToggleShuffleParams**kwargs)
PUT/me/player/shuffle

Toggle shuffle on or off for user’s playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

ParametersExpand Collapse
state: bool

true : Shuffle user's playback.
false : Do not shuffle user's playback.

device_id: Optional[str]

The id of the device this command is targeting. If not supplied, the user's currently active device is the target.

Toggle Playback Shuffle

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
client.me.player.toggle_shuffle(
    state=True,
)
Returns Examples