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

Get 500 Internal Server Error on https://api.spotify.com/v1/me/top/tracks

Get 500 Internal Server Error on https://api.spotify.com/v1/me/top/tracks

Hi,

 

I'm trying to do a GET request on /me/top/tracks but I get a 500 internal server error.

I first do a POST request for a bearer token:

curl --location --request POST 'https://accounts.spotify.com/api/token?grant_type=client_credentials&scope=user-top-read' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxx'

 

This works and I get a bearer token.

 

curl --location --request GET 'https://api.spotify.com/v1/me/top/tracks' \
--header 'Authorization: Bearer yyy'

 

Then I receive a 500 internal server error.

 

 

Reply
2 Replies

Did you solve this? I'm also stuck here

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