Does Client Credential flow allow add a track to queue?

Premium

Spain

 

Device

Macbook Pro 13" early 2015

Operating System

macOS Monterey 12.6

 

My Question or Issue

Trying to add songs to a queue from Web API to the same Spotify account that i own, but the response is: 

 

 

 

 

 

{
             "error" : {
               "status" : 403,
               "message" : "Player command failed: Premium required",
               "reason" : "PREMIUM_REQUIRED"
             }
}

 

 

 

 

 

Then i tried in https://developer.spotify.com/console/post-queue to obtain the token and the format is different and it works.

I don't know how to go trough that, thanks

 

 

Child Item
Child Item
Child Item

Accepted answers

All comments

No, adding tracks to queue requires authorization, so it requires the implementation of the Authorization Code Flow.

Also, as you can read in that error, that endpoint only works with Spotify Premium accounts.

What I want to implement is a website where users can search for a song and add it to the playback queue of a bar, without giving them access to the Spotify account. What's the point of using Authorization Code Flow, if the account where the song is going to be added to the queue is always going to be the same?

Because else anyone could add tracks to the queue of everyone. So, every user need to login at least once to get the required token(s).

If you let the program store the Access token and Refresh token into for example a file or a cookie, it can use them for further Authorization after the Access token expired after one hour.

 

P.S. I don't know which programming language you are using, but maybe there's a Web API Wrapper for it that can make everything easier.

Child Item
Child Item