Skip to content
DocumentationAPI Reference

Transfer Playback

me.player.transfer(PlayerTransferParams**kwargs)
PUT/me/player

Transfer playback to a new device and optionally begin playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

ParametersExpand Collapse
device_ids: SequenceNotStr[str]

A JSON array containing the ID of the device on which playback should be started/transferred.
For example:{device_ids:["74ASZWbe4lXaubB36ztrGX"]}
Note: Although an array is accepted, only a single device_id is currently supported. Supplying more than one will return 400 Bad Request

play: Optional[bool]

true: ensure playback happens on new device.
false or not provided: keep the current playback state.

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

Transfer Playback

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
client.me.player.transfer(
    device_ids=["74ASZWbe4lXaubB36ztrGX"],
)
Returns Examples