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

401 response when asking for user's profile but access token works for other request

Solved!

401 response when asking for user's profile but access token works for other request

Plan

Premium

 

My Question or Issue

I am working on a web app and I need to access the user's profile information to learn if they have a premium account. The access token I have been using already has the scope needed for this request, but when I run the request for the profile information, it returns a 401 error. It tells me that my access token is unauthorized. I have no idea why it is sending me this error response when it works for a different request. 

 

I will attach the code in the attachments. Any help is appreciated.

Reply

Accepted Solutions
Marked as solution

Since the Client Credentials flow does not include authorization, only endpoints that do not access user information can be accessed. Therefore, in this case, you should use a different Authorization method that lets you log in.

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

2 Replies

sonic9201_2-1709765220055.png

sonic9201_0-1709765193245.png

 

 

Marked as solution

Since the Client Credentials flow does not include authorization, only endpoints that do not access user information can be accessed. Therefore, in this case, you should use a different Authorization method that lets you log in.

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

Type a product name