Exchange Fitbit OAuth Code
fitbit_exchange_codeExchange a Fitbit OAuth authorization code for locally stored tokens, enabling secure API access. Requires a user-supplied code from browser OAuth.
Instructions
Exchange a Fitbit OAuth authorization code for local tokens. Tokens are stored locally with 0600 permissions and are never returned. Requires explicit user action: the user must complete browser OAuth and supply the authorization code (agents must not invent codes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | OAuth authorization code, or a full redirect URL containing ?code=... | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | Yes | ||
| scope | No | ||
| expires_at | No | ||
| token_path | Yes |