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

# Obtener Token

> This endpoint allows obtaining the access token for OAuth2 clients



## OpenAPI

````yaml POST /authentication/login
openapi: 3.0.1
info:
  title: Api V3 documentación
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.artisn.desarrollo-redbrand.com/api
  - url: https://api.kfc-group.desarrollo-redbrand.com
  - url: https://{apiId}.execute-api.{region}.amazonaws.com/{stage}
    description: API Gateway (PRIVATE; invocación típica vía VPC endpoint).
    variables:
      apiId:
        default: '{api-id}'
        description: ID del API REST desplegado.
      region:
        default: us-east-1
      stage:
        default: dev
        description: Mismo valor que parámetro EnvironmentName del stack.
security:
  - bearerAuth: []
paths:
  /authentication/login:
    post:
      description: This endpoint allows obtaining the access token for OAuth2 clients
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthBody'
      responses:
        '200':
          description: response upon logging in
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                    description: >-
                      The access token to be used in the API. DO NOT EXPOSE THIS
                      TOKEN TO THE CLIENT!
                    example: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        '401':
          description: authorization error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
      security: []
components:
  schemas:
    AuthBody:
      required:
        - client_id
        - client_secret
        - grant_type
      type: object
      properties:
        client_id:
          description: Unique client identifier
          type: string
        client_secret:
          description: Unique client secret
          type: string
        grant_type:
          description: Access type
          type: string
    Unauthorized:
      type: object
      properties:
        statusCode:
          description: Authentication error code.
          type: string
        message:
          description: Error message
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````