Skip to content
DocumentationAPI Reference

Player

Get Playback State
me.player.get_state(**kwargs) -> PlayerGetStateResponse { actions, context, currently_playing_type, 8 more }
GET/me/player
Transfer Playback
me.player.transfer(**kwargs) -> void
PUT/me/player
Get Available Devices
me.player.get_devices() -> PlayerGetDevicesResponse { devices }
GET/me/player/devices
Get Currently Playing Track
me.player.get_currently_playing(**kwargs) -> PlayerGetCurrentlyPlayingResponse { actions, context, currently_playing_type, 5 more }
GET/me/player/currently-playing
Start/Resume Playback
me.player.start_playback(**kwargs) -> void
PUT/me/player/play
Pause Playback
me.player.pause_playback(**kwargs) -> void
PUT/me/player/pause
Skip To Next
me.player.skip_next(**kwargs) -> void
POST/me/player/next
Skip To Previous
me.player.skip_previous(**kwargs) -> void
POST/me/player/previous
Seek To Position
me.player.seek_to_position(**kwargs) -> void
PUT/me/player/seek
Set Repeat Mode
me.player.set_repeat_mode(**kwargs) -> void
PUT/me/player/repeat
Set Playback Volume
me.player.set_volume(**kwargs) -> void
PUT/me/player/volume
Toggle Playback Shuffle
me.player.toggle_shuffle(**kwargs) -> void
PUT/me/player/shuffle
Get Recently Played Tracks
me.player.list_recently_played(**kwargs) -> CursorURLPage<PlayerListRecentlyPlayedResponse { context, played_at, published, track } >
GET/me/player/recently-played
ModelsExpand Collapse
class ContextObject { external_urls, href, published, 2 more }
external_urls: ExternalURLObject { published, spotify }

External URLs for this context.

published: 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: String

The Spotify URL for the object.

href: String

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

published: 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: String

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

uri: String

The Spotify URI for the context.

class DeviceObject { id, is_active, is_private_session, 6 more }
id: 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.

is_active: bool

If this device is the currently active device.

is_private_session: bool

If this device is currently in a private session.

is_restricted: 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: 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: 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: bool

If this device can be used to set the volume.

type: String

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

volume_percent: Integer

The current volume in percent.

minimum0
maximum100

PlayerQueue

Get the User's Queue
me.player.queue.get() -> QueueGetResponse { currently_playing, published, queue }
GET/me/player/queue
Add Item to Playback Queue
me.player.queue.add(**kwargs) -> void
POST/me/player/queue