Announcements

Having trouble seeing your Wrapped stories? To fix this, update the Spotify app to the latest version.

Find more info on our community FAQ.

Error code 503: upstream connection error

Error code 503: upstream connection error

I am currently developing a script that interacts with the spotify api, everything worked fine yesterday but today it only gives back a error code 503 and when i read the response, it is "upstream connect error or disconnect/reset before headers. reset reason: connection termination".

The code that gives that error:

 

 

 

 

    response = r.post(url='https://accounts.spotify.com/api/token',
                      data={
                          'grant_type': 'refresh_token',
                          'refresh_token': credentials['refreshToken']
                      }, headers={'Authorization': 'Basic ' + client_base64})
    if (response.status_code != 200):
        print("Error while refreshing: " + str(response.status_code))
        print(response.text)
        return

 

 

 

 

I hope someone has any idea what I did wrong or why it doesnt do what it should.

Reply
0 Replies

Suggested posts