Skip to content
DocumentationAPI Reference

Player

Get Playback State
me().player().getState(PlayerGetStateParamsparams = PlayerGetStateParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : PlayerGetStateResponse
GET/me/player
Transfer Playback
me().player().transfer(PlayerTransferParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player
Get Available Devices
me().player().getDevices(PlayerGetDevicesParamsparams = PlayerGetDevicesParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : PlayerGetDevicesResponse
GET/me/player/devices
Get Currently Playing Track
me().player().getCurrentlyPlaying(PlayerGetCurrentlyPlayingParamsparams = PlayerGetCurrentlyPlayingParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : PlayerGetCurrentlyPlayingResponse
GET/me/player/currently-playing
Start/Resume Playback
me().player().startPlayback(PlayerStartPlaybackParamsparams = PlayerStartPlaybackParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/play
Pause Playback
me().player().pausePlayback(PlayerPausePlaybackParamsparams = PlayerPausePlaybackParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/pause
Skip To Next
me().player().skipNext(PlayerSkipNextParamsparams = PlayerSkipNextParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/me/player/next
Skip To Previous
me().player().skipPrevious(PlayerSkipPreviousParamsparams = PlayerSkipPreviousParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/me/player/previous
Seek To Position
me().player().seekToPosition(PlayerSeekToPositionParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/seek
Set Repeat Mode
me().player().setRepeatMode(PlayerSetRepeatModeParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/repeat
Set Playback Volume
me().player().setVolume(PlayerSetVolumeParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/volume
Toggle Playback Shuffle
me().player().toggleShuffle(PlayerToggleShuffleParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/shuffle
Get Recently Played Tracks
me().player().listRecentlyPlayed(PlayerListRecentlyPlayedParamsparams = PlayerListRecentlyPlayedParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : PlayerListRecentlyPlayedPage
GET/me/player/recently-played
ModelsExpand Collapse
class ContextObject:
externalUrls: Optional<ExternalUrlObject>

External URLs for this context.

published: Optional<Boolean>

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

spotify: Optional<String>

The Spotify URL for the object.

href: Optional<String>

A link to the Web API endpoint providing full details of the track.

published: Optional<Boolean>

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

type: Optional<String>

The object type, e.g. "artist", "playlist", "album", "show".

uri: Optional<String>

The Spotify URI for the context.

class DeviceObject:
id: Optional<String>

The device ID. This ID is unique and persistent to some extent. However, this is not guaranteed and any cached device_id should periodically be cleared out and refetched as necessary.

isActive: Optional<Boolean>

If this device is the currently active device.

isPrivateSession: Optional<Boolean>

If this device is currently in a private session.

isRestricted: Optional<Boolean>

Whether controlling this device is restricted. At present if this is "true" then no Web API commands will be accepted by this device.

name: Optional<String>

A human-readable name for the device. Some devices have a name that the user can configure (e.g. "Loudest speaker") and some devices have a generic name associated with the manufacturer or device model.

published: Optional<Boolean>

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

supportsVolume: Optional<Boolean>

If this device can be used to set the volume.

type: Optional<String>

Device type, such as "computer", "smartphone" or "speaker".

volumePercent: Optional<Long>

The current volume in percent.

minimum0
maximum100

PlayerQueue

Get the User's Queue
me().player().queue().get(QueueGetParamsparams = QueueGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : QueueGetResponse
GET/me/player/queue
Add Item to Playback Queue
me().player().queue().add(QueueAddParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/me/player/queue