Announcements

Help Wizard

Step 1

NEXT STEP

What Spotify Web API does the DJ button use?

What Spotify Web API does the DJ button use?

Not feeling the vibe? Just hit the DJ button at the bottom right of the screen to be taken to a different genre, artist, or mood.

 

What API does this button use? I can't find any API under the Spotify Web API that seems to do what it does.

 

The DJ's playlist id is spotify:playlist:37i9dQZF1EYkqdzj48dyYq,  I thought maybe the /me/player/play API would work, but this just stops playback on my macOS Spotify app:

 

curl -X PUT \
--header "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"context_uri":"spotify:playlist:37i9dQZF1EYkqdzj48dyYq"}'
 
Whereas a call to another playlist works fine, for example, same call but use 
spotify:playlist:0iQ8A2wx7iouUszhoytPpj ("Lushlife like" playlist).
 
My goal is simply to make a call from the macOS command line to hit the DJ button, without having to flip over to the app and click it. The CLI Spotify apps I've seen are just wrappers around the AppleScript API, which also doesn't have anything for the DJ.
 
Thanks!
 
Reply
2 Replies

I'm curious how you even got the Playlist ID, I'm looking for a similar solution but when I look for the ID in the normal fashion there isn't an option to find the link. Hope you got it sorted out

 

Also, I noticed that any playlists I ever once upon a time made private were unavailable to use via the API. I had to recreate the playlist and it magically worked. Perhaps DJ is listed as private per user? 

Hi! Never figured it out and eventually I just gave up 😞. Maybe I'll pick it up again if it ever makes it into the AppleScript API.

 

I think I got the playlist id by calling one of the APIs to list your playlists, and the DJ was in there with the rest of them. I googled for that id, and found it in that other post and a bunch of others. If you're not seeing it maybe they're hiding it now. Sorry it's been a while and I can't quite remember.

Suggested posts