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

# Get authorization URL

> Start the OAuth flow. Returns an HTTPS URL to redirect the user for Tyms sign-in and business selection.

<Note>Guide: [OAuth 2.0](/oauth). No API key on this request — only query parameters.</Note>


## OpenAPI

````yaml /openapi/adam-v1.json get /oauth/authorization
openapi: 3.0.3
info:
  title: Adam Developer API
  version: 1.0.0
  description: >-
    REST API for useadam.io — Adam, the AI accounting agent for small
    businesses. Paths are appended to the server URL.


    **Business key** (`tyms_sk_...`): all routes except `POST
    /register-business` and OAuth authorization steps that document their own
    auth. **Partner key** (`adam_partner_sk_...` or equivalent): only `POST
    /register-business`. **OAuth**: integration apps use `tyms_pk_...` /
    `tyms_sk_...` plus user Bearer tokens — see the OAuth guide.


    Financial reports match what you see in the Adam app. AI create endpoints
    accept optional attachment objects (`name`, `file`, `type`) — see the
    Attachments page in this docs site.
servers:
  - url: https://api.useadam.io/v1/adam
    description: Production
security:
  - apiKey: []
tags:
  - name: Partners
    description: Referral partner (distributor) flows — partner API key only.
  - name: Authentication
    description: Validate a business Developer API key.
  - name: OAuth
    description: >-
      Third-party integration authorization — connect Tyms users to your app
      without sharing their business secret keys.
  - name: Chart of accounts
    description: COA and bank-linked accounts.
  - name: Invoices
    description: Invoice CRUD and payments.
  - name: Bills
    description: Bill CRUD and payments.
  - name: Expenses
    description: Expense CRUD.
  - name: Income
    description: Income record CRUD.
  - name: Journals
    description: Journal entry CRUD.
  - name: Contacts
    description: Contact CRUD.
  - name: Banks
    description: Bank accounts.
  - name: Bank transactions
    description: Statement lines and AI-assisted upload.
  - name: Reports
    description: Financial statements (aligned with in-app reports).
paths:
  /oauth/authorization:
    get:
      tags:
        - OAuth
      summary: Get authorization URL
      description: >-
        Start the OAuth flow. Returns an HTTPS URL to redirect the user for Tyms
        sign-in and business selection.
      operationId: oauthAuthorization
      parameters:
        - name: client_id
          in: query
          required: true
          schema:
            type: string
          description: Your app public key (`tyms_pk_...`).
        - name: redirect_uri
          in: query
          required: true
          schema:
            type: string
            format: uri
          description: HTTPS callback URL on your app.
        - name: reference
          in: query
          required: true
          schema:
            type: string
          description: Your correlation id for this authorization attempt.
        - name: privacy_url
          in: query
          required: true
          schema:
            type: string
            format: uri
          description: Link to your app's privacy policy.
        - name: terms_url
          in: query
          required: true
          schema:
            type: string
            format: uri
          description: Link to your app's terms of service.
      responses:
        '200':
          description: Authorization URL for user redirect
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizationSuccess'
              example:
                status: success
                message: Authorization request initiated successfully
                data:
                  authorization_url: >-
                    https://app.useadam.io/auth/oauth/self?client_id=tyms_pk_example&redirect_uri=https%3A%2F%2Fyourapp.com%2Foauth%2Fcallback&reference=conn_abc123
        '400':
          description: Invalid client id or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: failed
                message: Invalid client id
      security: []
components:
  schemas:
    OAuthAuthorizationSuccess:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
        data:
          type: object
          properties:
            authorization_url:
              type: string
              description: >-
                HTTPS URL to redirect the user for Tyms sign-in and business
                selection.
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: failed
        message:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Business secret `tyms_sk_...` for all routes except **Register
        business**, which expects your **partner** secret.
      x-default: your_tyms_sk_or_partner_key

````