setPlaybackVolume

suspend fun setPlaybackVolume(volumePercent: Int, deviceId: String? = null): SpotifyApiResponse<Boolean>

Sets playback volume percentage.

Return

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

Parameters

volumePercent

Target playback volume in percent (0..100).

deviceId

Spotify Connect device ID that should execute the playback action.