stravalib.client.Client.authorization_url#
- Client.authorization_url(client_id: int, redirect_uri: str, approval_prompt: Literal['auto', 'force'] = 'auto', scope: list[Literal['read', 'read_all', 'profile:read_all', 'profile:write', 'activity:read', 'activity:read_all', 'activity:write']] | Literal['read', 'read_all', 'profile:read_all', 'profile:write', 'activity:read', 'activity:read_all', 'activity:write'] | None = None, state: str | None = None) → str[source]#
Get the URL needed to authorize your application to access a Strava user’s information.
See https://developers.strava.com/docs/authentication/
- Parameters:
client_id (int) – The numeric developer client id.
redirect_uri (str) – The URL that Strava will redirect to after successful (or failed) authorization.
approval_prompt (str, default='auto') – Whether to prompt for approval even if approval already granted to app. Choices are ‘auto’ or ‘force’.
scope (list[str], default = None) – The access scope required. Omit to imply “read” and “activity:read” Valid values are ‘read’, ‘read_all’, ‘profile:read_all’, ‘profile:write’, ‘activity:read’, ‘activity:read_all’, ‘activity:write’.
state (str, default=None) – An arbitrary variable that will be returned to your application in the redirect URI.
- Returns:
A string containing the url required to authorize with the Strava API.
- Return type:
str