Start/Resume Playback
Start a new context or resume current playback on the user's active device. 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.
Authorization
oauth_2_0 user-modify-playback-stateSpotify supports OAuth 2.0 for authenticating all API requests.
In: header
Scope: user-modify-playback-state
Query Parameters
The id of the device this command is targeting. If not supplied, the user's currently active device is the target.
Request Body
application/json
Optional. Spotify URI of the context to play.
Valid contexts are albums, artists & playlists.
{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}
Optional. A JSON array of the Spotify track URIs to play.
For example: {"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]}
Optional. Indicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object
"position" is zero based and can’t be negative. Example: "offset": {"position": 5}
"uri" is a string representing the uri of the item to start at. Example: "offset": {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M"}
Indicates from what position to start playback. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.
Response Body
application/json
application/json
application/json
curl -X PUT "https://example.com/me/player/play" \ -H "Content-Type: application/json" \ -d '{ "context_uri": "spotify:album:5ht7ItJgpBH7W6vJ5BqpPr", "offset": { "position": 5 }, "position_ms": 0 }'Get Currently Playing Track GET
Get the object currently being played on the user's Spotify account.
Pause Playback PUT
Pause playback on the user's account. 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.

