togglePlaybackShuffle

suspend fun togglePlaybackShuffle(state: Boolean, deviceId: String? = null): SpotifyApiResponse<Boolean>

Enables or disables shuffle for playback.

Return

Wrapped Spotify API response. data is true when Spotify accepted the operation.

Parameters

state

True to enable shuffle, false to disable shuffle.

deviceId

Spotify Connect device ID that should execute the playback action.