Fitbit signs users in with their Fitbit account — the connector for wellness products that also read activity or sleep data.

## Copy the redirect URI

In the [Authdog console](https://console.authdog.com), select the project and environment, open **Authentication > Providers**, find **Fitbit**, and click **Enable**. Copy the redirect URI shown in the form:

```url
https://identity.authdog.com/api/v1/callback/<connectionId>
```

## Create the application

1. Open [dev.fitbit.com](https://dev.fitbit.com/apps/new) and register an application.
2. Set the **OAuth 2.0 Application Type** to **Server**, which is a confidential client.
3. Under **Redirect URL**, paste the redirect URI from Authdog.
4. Select the `profile`, `settings`, and `social` scopes.
5. Save, then copy the **OAuth 2.0 Client ID** and **Client Secret**.

## Configure Authdog

| Field | Value |
| --- | --- |
| **Client ID** | The client identifier from the provider |
| **Client Secret** | The client secret from the provider |

Save, then toggle the connection **active**.

## What Fitbit returns

Authdog requests the `profile settings social` scopes and reads the profile from `https://api.fitbit.com/1/user/-/profile.json`.

The profile endpoint returns the encoded user id, display name, avatar, timezone, and locale.

Fitbit does not release an email address through this scope set. Users who arrive through it have a display name and an identifier only. Pair it with a method that collects one, or ask for an email after the first sign-in.

## Test it

1. Open your environment's hosted sign-in page, or link to `https://identity.authdog.com/api/v1/signin/<connectionId>`.
2. Select the Fitbit button and complete the flow.
3. Confirm the user appears under **Users** in the console with a Fitbit identity linked.

## Troubleshooting

| Symptom | Cause |
| --- | --- |
| `invalid_client` | The application type is Client or Personal rather than Server |
| `invalid_scope` | A requested scope is not enabled on the application |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own `connectionId`, and so its own redirect URI to register |

## Related

| Read | To learn how to |
| --- | --- |
| [Connectors](/docs/connectors) | Set up any other social provider |
