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

Can't get recently played songs -

Solved!

Can't get recently played songs -

 

 

My Question or Issue

Hello, 

I'm trying to get my recently played songs and getting an error message saying. 

{'error': {'status': 500, 'message': 'Server error.'}}

 I'm using the correct scope: 

data = {
    'grant_type' : 'client_credentials',
    'client_id' : CLIENT_ID,
    'client_secret': CLIENT_SECRET,
    'scope': 'user-read-recently-played'.

}
auth_res = requests.post(auth_url, data=data)
access_token = auth_res.json().get('access_token')

headers = {
    'Authorization': 'Bearer {}'.format(access_token)
}
 
endpoint = f"?limit={50}&before={unix_timestamp}"
url = ''.join([base_url,endpoint])
print(url)
response = requests.get(url, headers=headers)
 
 
 

 

Reply

Accepted Solutions
Marked as solution

No  you can not get recently played songs with Client Credentials, because this endpoint requires user authorization.

XimzendRising 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

1 Reply
Marked as solution

No  you can not get recently played songs with Client Credentials, because this endpoint requires user authorization.

XimzendRising 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