stravalib.client.Client.deauthorize#
- Client.deauthorize() → None[source]#
Revoke the application’s access to the athlete’s data.
Prefers the refresh token, falling back to the access token, without refreshing either token first. Strava invalidates the associated access and refresh tokens. Discard your stored tokens after success; local client state is not cleared.
- Raises:
ValueError – If application credentials are missing or neither token is set.
stravalib.exc.AccessUnauthorized – If Strava rejects the application credentials.
stravalib.exc.Fault – If Strava reports another error or an unexpected status.
Notes
The
/oauth/revokeendpoint requires application credentials. SetSTRAVA_CLIENT_IDandSTRAVA_CLIENT_SECRETin the environment before constructing the client. Credentials passed to token exchange or manual refresh are not retained for this call.See https://developers.strava.com/docs/authentication/#deauthorization