> ## Documentation Index
> Fetch the complete documentation index at: https://openwearables.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Provider Authorization URL

> Initiate OAuth flow for a provider.

Returns authorization URL where user should be redirected to log in.



## OpenAPI

````yaml https://api.openwearables.io/openapi.json get /api/v1/oauth/{provider}/authorize
openapi: 3.1.0
info:
  title: Open Wearables API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/oauth/{provider}/authorize:
    get:
      tags:
        - 'External: Providers'
      summary: Get Provider Authorization URL
      description: |-
        Initiate OAuth flow for a provider.

        Returns authorization URL where user should be redirected to log in.
      operationId: authorize_provider_api_v1_oauth__provider__authorize_get
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ProviderName'
        - name: user_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            description: User ID to connect
            title: User Id
          description: User ID to connect
        - name: redirect_uri
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional redirect URI after authorization
            title: Redirect Uri
          description: Optional redirect URI after authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationURLResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProviderName:
      type: string
      enum:
        - apple
        - samsung
        - google
        - garmin
        - polar
        - suunto
        - whoop
        - strava
        - oura
        - fitbit
        - ultrahuman
        - unknown
        - internal
      title: ProviderName
      description: Supported data providers.
    AuthorizationURLResponse:
      properties:
        authorization_url:
          type: string
          title: Authorization Url
        state:
          type: string
          title: State
      type: object
      required:
        - authorization_url
        - state
      title: AuthorizationURLResponse
      description: Response containing authorization URL for user redirect.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````