Skip to content
DocumentationAPI Reference

Player

Get Playback State
me.player.get_state(PlayerGetStateParams**kwargs) -> PlayerGetStateResponse
GET/me/player
Transfer Playback
me.player.transfer(PlayerTransferParams**kwargs)
PUT/me/player
Get Available Devices
me.player.get_devices() -> PlayerGetDevicesResponse
GET/me/player/devices
Get Currently Playing Track
me.player.get_currently_playing(PlayerGetCurrentlyPlayingParams**kwargs) -> PlayerGetCurrentlyPlayingResponse
GET/me/player/currently-playing
Start/Resume Playback
me.player.start_playback(PlayerStartPlaybackParams**kwargs)
PUT/me/player/play
Pause Playback
me.player.pause_playback(PlayerPausePlaybackParams**kwargs)
PUT/me/player/pause
Skip To Next
me.player.skip_next(PlayerSkipNextParams**kwargs)
POST/me/player/next
Skip To Previous
me.player.skip_previous(PlayerSkipPreviousParams**kwargs)
POST/me/player/previous
Seek To Position
me.player.seek_to_position(PlayerSeekToPositionParams**kwargs)
PUT/me/player/seek
Set Repeat Mode
me.player.set_repeat_mode(PlayerSetRepeatModeParams**kwargs)
PUT/me/player/repeat
Set Playback Volume
me.player.set_volume(PlayerSetVolumeParams**kwargs)
PUT/me/player/volume
Toggle Playback Shuffle
me.player.toggle_shuffle(PlayerToggleShuffleParams**kwargs)
PUT/me/player/shuffle
Get Recently Played Tracks
me.player.list_recently_played(PlayerListRecentlyPlayedParams**kwargs) -> SyncCursorURLPage[PlayerListRecentlyPlayedResponse]
GET/me/player/recently-played
ModelsExpand Collapse
class ContextObject:
external_urls: Optional[ExternalURLObject]

External URLs for this context.

published: Optional[bool]

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[str]

The Spotify URL for the object.

href: Optional[str]

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

published: Optional[bool]

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[str]

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

uri: Optional[str]

The Spotify URI for the context.

class DeviceObject:
id: Optional[str]

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.

is_active: Optional[bool]

If this device is the currently active device.

is_private_session: Optional[bool]

If this device is currently in a private session.

is_restricted: Optional[bool]

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[str]

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[bool]

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

supports_volume: Optional[bool]

If this device can be used to set the volume.

type: Optional[str]

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

volume_percent: Optional[int]

The current volume in percent.

minimum0
maximum100

PlayerQueue

Get the User's Queue
me.player.queue.get() -> QueueGetResponse
GET/me/player/queue
Add Item to Playback Queue
me.player.queue.add(QueueAddParams**kwargs)
POST/me/player/queue