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

# Token

> Exchange an authorization code, client credentials, or refresh token for an access token.



## OpenAPI

````yaml post /oauth2/token
openapi: 3.0.0
info:
  version: 1.0.0
  title: Tickable API
  description: >-
    The Tickable API provides programmatic access to events, orders, tickets,
    and webhooks for your organization.
  contact:
    name: Tickable
    url: https://tickable.nl
servers:
  - url: https://api.tickable.io
    description: Production
security:
  - Bearer: []
tags:
  - name: Events
    description: Manage events
  - name: Tickets
    description: View tickets
  - name: Orders
    description: View orders
  - name: Webhooks
    description: Manage webhook subscriptions
  - name: User
    description: Current user information
  - name: OAuth
    description: OAuth2 authorization and token endpoints
paths:
  /oauth2/token:
    post:
      tags:
        - OAuth
      summary: Token
      description: >-
        Exchange an authorization code, client credentials, or refresh token for
        an access token.
      operationId: token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  example: authorization_code
                  description: >-
                    One of: authorization_code, client_credentials,
                    refresh_token
                client_id:
                  type: string
                  example: your-client-id
                client_secret:
                  type: string
                  example: your-client-secret
                code:
                  type: string
                  description: Authorization code (for authorization_code grant)
                redirect_uri:
                  type: string
                  example: https://app.example.com/callback
                refresh_token:
                  type: string
                  description: Refresh token (for refresh_token grant)
              required:
                - grant_type
                - client_id
                - client_secret
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  example: client_credentials
                client_id:
                  type: string
                  example: your-client-id
                client_secret:
                  type: string
                  example: your-client-secret
                code:
                  type: string
                redirect_uri:
                  type: string
                refresh_token:
                  type: string
              required:
                - grant_type
                - client_id
                - client_secret
      responses:
        '200':
          description: Access token issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: eyJhbGciOiJIUzI1NiIs...
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: number
                    example: 3600
                  refresh_token:
                    type: string
                    example: dGhpcyBpcyBhIHJlZnJlc2g...
                  scope:
                    type: string
                    example: events.read webhooks.read
                required:
                  - access_token
                  - token_type
                  - expires_in
        '400':
          description: Invalid request or grant
        '401':
          description: Invalid client credentials
      security: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: >-
        Pass as `Authorization: Bearer {token}`. Accepts either an OAuth2 JWT
        access token or an API key (`tk_live_...`) created from the Tickable
        dashboard.

````