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

# Exchange code or credentials for an access token



## OpenAPI

````yaml services/quotes/openapi-v1.yaml post /oauth/token
openapi: 3.0.0
info:
  title: Dos Quotes API
  version: 1.0.0
servers:
  - url: https://app.dosfinds.co.uk
    description: Production
security: []
tags:
  - name: Authentication
    description: OAuth2 flows via Doorkeeper
  - name: Users
    description: Endpoints for user profile
  - name: Leads
    description: Endpoints for listing and managing leads
paths:
  /oauth/token:
    post:
      tags:
        - Authentication
      summary: Exchange code or credentials for an access token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - grant_type
              properties:
                grant_type:
                  type: string
                  enum:
                    - authorization_code
                    - refresh_token
                    - client_credentials
                code:
                  type: string
                  description: Authorization code (for `authorization_code` flow)
                redirect_uri:
                  type: string
                  format: uri
                  description: Must match the one used in authorize
                client_id:
                  type: string
                client_secret:
                  type: string
                refresh_token:
                  type: string
                  description: Refresh token (for `refresh_token` flow)
                scope:
                  type: string
                  description: Requested scopes (optional)
      responses:
        '200':
          description: Access token response
          content:
            application/json:
              schema:
                type: object
                required:
                  - access_token
                  - token_type
                  - expires_in
                  - created_at
                properties:
                  access_token:
                    type: string
                    example: abc123
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                    example: 7200
                  refresh_token:
                    type: string
                    example: def456
                  created_at:
                    type: integer
                    example: 1618884471

````