provider Player PUT /me/player
@utdk/spotify /me/player
Transfer Playback
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.

Try it

Authentication
Configure credentials for Spotify Web API
transferAUsersPlayback
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.

Input

required

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

**true**: ensure playback happens on new device.<br/>**false** or not provided: keep the current playback state.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import spotify from '@utdk/spotify';

await spotify.transferAUsersPlayback()