Hi,
As stated in the subject, is there a way I can play a specific song or set of songs in a playlist via the Web API or Web SDK? I've far as I've found, the closest I can get to playing a song or playlist is via adding to queue or skipping to the next track or skipping to the previous track.
Thanks,
Hey there, help's here!
You can use the Start/Resume a User's Playback-endpoint to play something specific on the currently active device (or other device, if specified). You can play a song from a user's webbrowser with the Web Playback SDK. Let me know if you have any questions about these!
Happy coding,
Hubo
Thank you!
Hi Hubo, I have been trying to get it so I can search for song and being able to click on one of the returned songs from the search so that I can play that specific song. but so far I am getting errors. is it possible for that to happen with the start/resume a user's playback endpoint? or is that feature not available?
Hi amirlasalle,
To use functions like searching for a song, you can use Client Credentials. Because the Playback SDK requires user authorization, this isn't sufficient.
To make it work, you will need to implement another OAuth flow.
You can choose between the Authorization code if you want to run your code on a back-ed server, or Authorization code with PKCE extension if you want to run the code fully in your browser. In your case, I recommend the second option. You can use all endpoints with this flow (with the required scopes specified) and I recommend not mixing flows.
Hey there, help's here!
You can use the Start/Resume a User's Playback-endpoint to play something specific on the currently active device (or other device, if specified). You can play a song from a user's webbrowser with the Web Playback SDK. Let me know if you have any questions about these!
Happy coding,
Hubo