Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

How can use the Start/Resume Playback command with an artist and music

How can use the Start/Resume Playback command with an artist and music

When using the Start/Resume Playback with an album I'm able to use offset for selecting the 5th song for that album for example, I would like to do the same when selecting an artist, selecting not the first song from that artist but maybe the 5th or 6th, so I could put a random number when selecting that artist and each time I do, a different song comes.
Can anyone send me the body example for this function? Thank you
Reply
3 Replies

Waggin' hello to you!

To use the Start/Resume Playback command with an artist and a specific song from that artist, you can use the following body example:

 

{
  "context_uri": "spotify:artist:<artist_id>",
  "offset": {
    "position": <song_position>
  },
  "position_ms": <position_in_ms>
}

 

 

Replace <artist_id> with the Spotify ID of the artist you want to play, and <song_position> with the position of the song you want to start playing (for example, 4 for the 5th song). You can also add an optional position_ms field to specify a starting position within the song in milliseconds.

PragueSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Here's an example body that would start playing the 5th song from the artist "Radiohead":

 

 

 

{
  "context_uri": "spotify:artist:4Z8W4fKeB5YxbusRsdQVPb",
  "offset": {
    "position": 4
  }
}

 

 

 

Note that you will need to replace the artist ID with the ID of the artist you want to play. You can find the ID for an artist by searching for them on the Spotify web player or app, and looking at the URI in the artist's page URL.

 

 

I'll be barking up the wrong tree without an update from ya 🙂

 

-Prague the Dog

PragueSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

I actually tried it but it returns the following message:
"message": "Can't have offset for context type: ARTIST"

 

did you have sucess with this approach?

Suggested posts