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

# OAuth 2.0 — получение токена по Client Credentials

> Обмен client_id и client_secret на access token.
Требуемые параметры:
- client_id — идентификатор клиента
- client_secret — секрет клиента

Возвращает:
- accessToken: токен
- expiresIn: срок действия токена в секундах
- tokenType: тип токена



## OpenAPI

````yaml /api-reference/swagger.json post /api/v1/auth/token
openapi: 3.0.1
info:
  title: Teez Seller API — Combined
  version: v1.0
servers:
  - url: https://seller-api.teez.kz
security:
  - oauth2: []
paths:
  /api/v1/auth/token:
    post:
      tags:
        - Auth
      summary: OAuth 2.0 — получение токена по Client Credentials
      description: |-
        Обмен client_id и client_secret на access token.
        Требуемые параметры:
        - client_id — идентификатор клиента
        - client_secret — секрет клиента

        Возвращает:
        - accessToken: токен
        - expiresIn: срок действия токена в секундах
        - tokenType: тип токена
      operationId: GetTokenEndpoint
      requestBody:
        x-name: GetTokenEndpointRequest
        description: ''
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/TeezB2BGatewayApiEndpointsAuthGetTokenGetTokenEndpointRequest
        required: true
        x-position: 1
      responses:
        '200':
          description: Токен успешно выдан
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/TeezB2BGatewayApiEndpointsAuthGetTokenGetTokenEndpointResponse
        '400':
          description: Неверные или отсутствующие параметры
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/FastEndpointsErrorResponse'
components:
  schemas:
    TeezB2BGatewayApiEndpointsAuthGetTokenGetTokenEndpointRequest:
      type: object
      example:
        clientId: client
        clientSecret: secret
      additionalProperties: false
      required:
        - clientId
        - clientSecret
      properties:
        clientId:
          type: string
          minLength: 1
          nullable: false
          example: client
        clientSecret:
          type: string
          minLength: 8
          pattern: '[0-9]'
          nullable: false
          example: secret
    TeezB2BGatewayApiEndpointsAuthGetTokenGetTokenEndpointResponse:
      type: object
      additionalProperties: false
      properties:
        accessToken:
          type: string
        expiresIn:
          type: integer
          format: int32
        tokenType:
          type: string
    FastEndpointsErrorResponse:
      type: object
      additionalProperties: false
      properties:
        statusCode:
          type: integer
          format: int32
          default: 400
        message:
          type: string
          default: One or more errors occurred!
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    oauth2:
      type: http
      description: Please enter valid JWT token
      scheme: Bearer
      bearerFormat: JWT

````