Skip to content
DocumentationAPI Reference

Player

Get Playback State
PlayerGetStateResponse me().player().getState(PlayerGetStateParamsparams = PlayerGetStateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/me/player
Transfer Playback
me().player().transfer(PlayerTransferParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player
Get Available Devices
PlayerGetDevicesResponse me().player().getDevices(PlayerGetDevicesParamsparams = PlayerGetDevicesParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/me/player/devices
Get Currently Playing Track
PlayerGetCurrentlyPlayingResponse me().player().getCurrentlyPlaying(PlayerGetCurrentlyPlayingParamsparams = PlayerGetCurrentlyPlayingParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
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
PlayerListRecentlyPlayedPage me().player().listRecentlyPlayed(PlayerListRecentlyPlayedParamsparams = PlayerListRecentlyPlayedParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/me/player/recently-played
ModelsExpand Collapse
class ContextObject:
Optional<ExternalUrlObject> externalUrls

External URLs for this context.

Optional<Boolean> published

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

Optional<String> spotify

The Spotify URL for the object.

Optional<String> href

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

Optional<Boolean> published

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

Optional<String> type

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

Optional<String> uri

The Spotify URI for the context.

class DeviceObject:
Optional<String> id

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.

Optional<Boolean> isActive

If this device is the currently active device.

Optional<Boolean> isPrivateSession

If this device is currently in a private session.

Optional<Boolean> isRestricted

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

Optional<String> name

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.

Optional<Boolean> published

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

Optional<Boolean> supportsVolume

If this device can be used to set the volume.

Optional<String> type

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

Optional<Long> volumePercent

The current volume in percent.

minimum0
maximum100

PlayerQueue

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