setVolume

suspend fun setVolume(volumePercent: Int, deviceId: String? = null)(source)

Set the volume for the user’s current playback device.

Requires the SpotifyScope.UserModifyPlaybackState scope

Api Reference

Parameters

volumePercent

The volume to set. Must be a value from 0 to 100 inclusive.

deviceId

The device to play on