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

# Obtain token

> Generate an access token to authenticate API requests.



## OpenAPI

````yaml POST /token
openapi: 3.0.0
info:
  version: 2.0.0
  title: illuxiLMS API
  description: Interact with the illuxiLMS API to manage your learning content and users.
  termsOfService: https://illuxi.com/conditions-utilisation/
  contact:
    name: illuxi Team
    email: info@illuxi.com
    url: https://illuxi.com
servers:
  - url: https://{portalApiUrl}
    description: Production server (uses live data)
    variables:
      portalApiUrl:
        default: your-portal.acme.com/api-v2
        description: Your portal's API URL
security:
  - bearerAuth: []
paths:
  /token:
    post:
      description: Generate an access token to authenticate API requests.
      operationId: generateToken
      requestBody:
        description: API Key for authentication
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - apikey
              properties:
                apikey:
                  type: string
                  description: Your portal's API key
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The generated token
        default:
          description: Error generating access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Authentication token obtained from POST /token

````