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

POST request is being denied due to 401 despite a valid Token

POST request is being denied due to 401 despite a valid Token

Plan

Premium

Country: US

 

My Question or Issue

I've had great success acquiring a token and using GET requests to grab data from my playlists.

 

I'm attempting to use the POST request to add a track to a playlist and I receive the unexpected:

 

 

 

 

 

{
    "error": {
        "status": 401,
        "message": "Valid user authentication required"
    }
}

 

 

 

 

 
Is there anything different about Bearer tokens when it comes to POST vs. GET?
Reply
1 Reply

Hi @ha_arretx 

 

Thanks for posting in the Spotify Community, and welcome!

 

Are you using an Access Token you got through the first tutorial or Client Credentials?

If so, that causes the error message.

You should use an Access Token that you get through an Authorization Code Flow that lets you login instead.

Also, don't forget to use the required Authorisation scopes. You can find them at almost every endpoint's documentation page.

 

I hope this helps.

 

Cheers!

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.

Suggested posts