Announcements
From 28th September 2026, Community private messages will no longer be available. If you have any private messages you'd like to keep, please save or copy them using these steps before this date. Thank you.

Help Wizard

Step 1

NEXT STEP

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

Let's introduce ourselves!

Hey there you, ย  Yeah, you!ย 😁 ย  Welcome - we're glad you joined the Spotify Community! ย  While you here, let's have a fun game and getโ€ฆ

ModeratorStaff / Moderator/ 5 years ago  in Social & Random