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

# Create Access Token

> Generates an access token using the client credentials flow. Tokens expire every 60 minutes.

To authenticate, provide your `client_id`, `client_secret`, and set `grant_type` to `client_credentials`.

If you do not have a `client_id` and `client_secret`, contact fabric support to request API access credentials.




## OpenAPI

````yaml product-agent.openapi post /platform/v1/auth/token
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support Team
  description: >
    The Product Agent API helps brands optimize product data for AI-driven
    commerce.

    Monitor how your catalog performs in AI search experiences, enrich product

    content for stronger semantic visibility, and publish optimized data across

    channels. Designed for iterative improvement, Product Agent enables teams to

    measure, refine, and enhance product content as AI shopping behavior
    evolves.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: fabric Orders API
  version: 3.0.0
  x-audience: external-public
servers:
  - url: https://commerceos.aiagents.fabric.inc/api
    description: Production API
security:
  - authorization: []
externalDocs:
  description: Find out more about Product Agent.
  url: https://developer.fabric.inc/product-agent/overview
paths:
  /platform/v1/auth/token:
    post:
      summary: Create Access Token
      description: >
        Generates an access token using the client credentials flow. Tokens
        expire every 60 minutes.


        To authenticate, provide your `client_id`, `client_secret`, and set
        `grant_type` to `client_credentials`.


        If you do not have a `client_id` and `client_secret`, contact fabric
        support to request API access credentials.
      operationId: loginUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - client_id
                - client_secret
                - grant_type
              properties:
                grant_type:
                  type: string
                  example: client_credentials
                client_id:
                  type: string
                  example: ser_zUe74HYT98d6ItDhIQWYYur0k
                client_secret:
                  type: string
                  example: bv_1s9uWC_7324598gjdsh_ijSUVmm6YCt-6Ahd8Nt3GsTb8w8
      responses:
        '200':
          description: Successful authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: Invalid request
                    type: CLIENT_ERROR
                message: Bad request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad request
        '401':
          content:
            application/json:
              example:
                message: Unauthorized request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Unauthorized
        '500':
          content:
            application/json:
              example:
                message: Internal server error
                type: SERVER_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal server error
      security: []
      servers:
        - url: https://commerceos.aiagents.fabric.inc
          description: Auth Server
components:
  schemas:
    AuthResponse:
      type: object
      required:
        - access_token
        - token_type
        - expires_in
        - scope
      properties:
        access_token:
          type: string
          description: >-
            Access token used for authenticated requests. Tokens expire every 60
            minutes.
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        token_type:
          type: string
          description: Type of token returned.
          example: bearer
        expires_in:
          type: integer
          description: Time in seconds until the token expires.
          example: 3600
        scope:
          type: string
          description: Scope of the access token.
          example: ''
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````