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

# Get Access Token

> Exchange client credentials for an access token using OAuth 2.0 client_credentials grant. Tokens are valid for 1 hour.



## OpenAPI

````yaml /openapi.json post /api/v1/oauth/token
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: commerce
    description: Root commerce discovery
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, and publish
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/oauth/token:
    post:
      tags:
        - oauth
      summary: Get Access Token
      description: >-
        Exchange client credentials for an access token using OAuth 2.0
        client_credentials grant. Tokens are valid for 1 hour.
      operationId: post_v1_oauth_token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - grant_type
                - client_id
                - client_secret
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                  description: Must be 'client_credentials'.
                client_id:
                  type: string
                  description: Your OAuth client ID (UUID format).
                client_secret:
                  type: string
                  description: Your OAuth client secret.
            example:
              grant_type: client_credentials
              client_id: your-client-id-uuid
              client_secret: your-client-secret
          application/json:
            schema:
              type: object
              required:
                - grant_type
                - client_id
                - client_secret
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                  description: Must be 'client_credentials'.
                client_id:
                  type: string
                  description: Your OAuth client ID (UUID format).
                client_secret:
                  type: string
                  description: Your OAuth client secret.
      responses:
        '200':
          description: Token issued successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: JWT access token to use in Authorization header.
                  token_type:
                    type: string
                    enum:
                      - Bearer
                    description: Token type (always 'Bearer').
                  expires_in:
                    type: integer
                    description: Token validity in seconds (3600 = 1 hour).
              example:
                access_token: <access_token>
                token_type: Bearer
                expires_in: 3600
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_description:
                    type: string
        '401':
          description: Unauthorized - Invalid client credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_client
                  error_description:
                    type: string
      security: []

````