Help Wizard

Step 1

NEXT STEP

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.

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.

Suggested posts