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

403 Error for POST QUEUE with Premium Account

Solved!

403 Error for POST QUEUE with Premium Account

Plan

Premium

Country

US

Device

HP Laptop

Operating System

Windows 11

 

My Question or Issue

I am trying to make a program that allows me to add a song to my queue using the Add Item to Playback Queue. I have gotten to the point where I am trying to add a track to my current queue. However, as I have been doing this, I ran into a 403 error. When this happened, I did research and read from several sources that I needed a Premium Account in order to make this POST request. After signing up for a Spotify Premium account, I tried again, and it was still giving me the same error. I checked my scope and as far as I can tell it should be correct.

I even have used other sites such as "https://tryapis.com/spotify/api/endpoint-skip-users-playback-to-previous-track" to make the request. The site works with other API request such as GET and PUT, but it wouldn't let me POST. Any ideas on why this may be happening?

 

I attached an image of the code for both authorizing and for the request I am making. I didn't include all of the scopes I am using since they weren't fitting on the screen.

Screenshot 2023-07-26 235002.png
Reply

Accepted Solutions
Marked as solution

It is not possible to use that endpoint with Client Credentials, because Authorization (lets you log in) is required.

XimzendSpotify 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.

View solution in original post

6 Replies
Marked as solution

It is not possible to use that endpoint with Client Credentials, because Authorization (lets you log in) is required.

XimzendSpotify 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.

How do I double check that I am using the correct authorization just for future notice?

In the screenshot you can see:

body: 'grand_type=client_credentials&…'

That's how I saw it.

XimzendSpotify 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.

So, I am now trying to use the Authorization access token instead of the client_credentials, but it is still failing to send the request. It is saying how the access token isn't valid. I have been using https://tryapis.com/spotify/api/endpoint-add-to-queue to test this. This web page also has a section where you can login to Spotify, thus allowing me to make the the API request. Using their authorization, it allows me to use most of the api request, but still fails when I am trying to use add to queue. It returns a 403 error without any body for an error message. And, as I said before, the Authorization access token doesn't work for it.

Screenshot 2023-11-16 090231.png

That website isn't working for me either, so that website is the problem (maybe their client id got revoked). Normally it would work with the Authorization Code flow.

XimzendSpotify 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.

Never mind, the authorization was the issue. I just needed to add the proper scope to the authorization access key. I believe that the website is using client_credentials instead. Thank you for all of your help!

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random