stravalib.client.Client.exchange_code_for_token

Client.exchange_code_for_token(client_id, client_secret, code)[source]

Exchange the temporary authorization code (returned with redirect from strava authorization URL) for a short-lived access token and a refresh token (used to obtain the next access token later on).

client_idint

The numeric developer client id.

client_secretstr

The developer client secret

codestr

The temporary authorization code

Dictionary containing the access_token, refresh_token and expires_at (number of seconds since Epoch when the provided access token will expire)