whoop-get-authorization-url
Generate an OAuth authorization URL to authenticate users for accessing WHOOP fitness and health data through the API.
Instructions
Get the authorization URL for OAuth flow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/whoop-api.ts:140-153 (handler)Core implementation of generating the OAuth authorization URL for Whoop API using client configuration.getAuthorizationUrl(state?: string): string { const params = new URLSearchParams({ client_id: this.config.clientId, redirect_uri: this.config.redirectUri, response_type: 'code', scope: 'read:recovery read:cycles read:workout read:sleep read:profile read:body_measurement' }); if (state) { params.append('state', state); } return `https://api.prod.whoop.com/oauth/oauth2/auth?${params.toString()}`; }
- src/mcp-server.ts:485-495 (handler)MCP server switch case handler that calls the WhoopApiClient.getAuthorizationUrl() and returns formatted text response.case 'whoop-get-authorization-url': { const url = this.whoopClient.getAuthorizationUrl(); return { content: [ { type: 'text', text: `Authorization URL: ${url}`, }, ], }; }
- src/mcp-server.ts:240-248 (registration)Tool registration in the ListTools response, including name, description, and input schema (empty object).{ name: 'whoop-get-authorization-url', description: 'Get the authorization URL for OAuth flow', inputSchema: { type: 'object', properties: {}, required: [], }, },