Transfer Playback
client.me.player.transfer(PlayerTransferParams { device_ids, play, published } body, RequestOptionsoptions?): void
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.
Parameters
Transfer Playback
import Spotted from 'spotted-ts';
const client = new Spotted({
accessToken: process.env['SPOTIFY_ACCESS_TOKEN'], // This is the default and can be omitted
});
await client.me.player.transfer({ device_ids: ['74ASZWbe4lXaubB36ztrGX'] });