Announcements

Help Wizard

Step 1

NEXT STEP

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.

Suggested posts