# Strava (prebuilt connector)

## Description

**Strava** is a fitness tracking platform that allows users to record, analyse, and share their physical activities, including running, cycling, and swimming. It offers social features and detailed performance analytics through activity data.

## API documentation

API documentation for Strava (used to build this connector) can be found via the link below:

{% embed url="<https://developers.strava.com/docs/>" %}

## Authentication&#x20;

When adding connector instances for Strava, the following authentication methods are supported:

* [OAuth 2 (authorisation code)](#oauth-2-authorisation-code)

### OAuth 2 (authorisation code)

When a user chooses to [add a connector instance](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance) using **OAuth 2 (authorisation code)** authentication, the credentials below are prompted:

<table><thead><tr><th width="194.5234375">Credential</th><th width="148.11328125" data-type="checkbox">Required?</th><th>Notes</th></tr></thead><tbody><tr><td><code>base url</code></td><td>true</td><td>The base URL of endpoints to be targeted without the <code>https://</code> element - for example: <code>www.strava.com/api/v3</code></td></tr><tr><td><code>state length</code></td><td>true</td><td>This is a numeric value which determines the length of a random string generated (behind the scenes) during the OAuth process, for verification purposes. Our suggested setting is <code>10</code>.</td></tr><tr><td><code>Scope</code></td><td>true</td><td>Enter required scopes for access to Strava data, for example: <code>read, activity:read_all</code>. More information is available in <a href="https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess">Strava's documentation</a>.</td></tr><tr><td><code>Client ID</code> &#x26; <code>Client secret</code></td><td>true</td><td>These credentials allow Patchworks to authenticate and interact with Strava. Credentials are obtained during registration of a Patchworks application in your Strava API settings.</td></tr><tr><td><code>response authentication token key</code></td><td>true</td><td>Leave set to <code>access_token</code>.</td></tr><tr><td><code>grant token</code></td><td>true</td><td>Leave set to <code>authorization_code</code>.</td></tr><tr><td><code>response type key</code></td><td>true</td><td>Leave set to <code>code</code>.</td></tr><tr><td><code>refresh grant type</code></td><td>true</td><td>Leave set to <code>refresh_token</code>.</td></tr><tr><td><code>response refresh token key</code></td><td>true</td><td>Leave set to <code>refresh_token</code>.</td></tr></tbody></table>
