API: How do refresh tokens work?

geoffrey
Community Novice


I am trying to us e a refresh token to get a new access token, but I keep getting a 500 error.

Here is my request:

payload = {

    'client_id': client_id,

    'client_secret': client_secret,

    'grant_type': 'refresh_token',

    'refresh_token': refresh_token

}

response = requests.post('https://<account_name>.instructure.com/login/oauth2/token', headers={'Content-Type': 'application/json'}, json=payload)

print response

0 Likes