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

# Acquire token

> Acquire an access token via OAuth2/OIDC. Supports authorization_code, refresh_token, and client_credentials grant types.



## OpenAPI

````yaml api-docs/archived/auth.json post /v1/regions/global/auth/tokens
openapi: 3.1.1
info:
  title: Auth & IAM API
  version: 1.0.0
  description: >-
    Authentication and Identity Access Management API for the k0rdent Enterprise
    platform. Provides OAuth2/OIDC token management, session lifecycle, user
    management, RBAC, service accounts, API keys, and identity provider
    configuration.
  contact:
    name: k0rdent Enterprise API Support
    email: api-support@example.com
    url: https://support.example.com
  license:
    name: Proprietary
    url: https://k0rdent.example.com/license
servers:
  - url: ''
    description: For documentation only
  - url: https://api.example.com
    description: Arc API Base URL
  - url: https://api.internal.example.com
    description: Atlas API Base URL
  - url: http://localhost:{port}
    description: Local Development
    variables:
      port:
        default: '4050'
        description: Auth service port
security: []
paths:
  /v1/regions/global/auth/tokens:
    post:
      tags:
        - Authentication
      summary: Acquire token
      description: >-
        Acquire an access token via OAuth2/OIDC. Supports authorization_code,
        refresh_token, and client_credentials grant types.
      operationId: acquireToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                grantType:
                  type: string
                  enum:
                    - authorization_code
                    - refresh_token
                    - client_credentials
                  description: OAuth2 grant type
                code:
                  type: string
                  nullable: true
                  description: Authorization code (for authorization_code grant)
                refreshToken:
                  type: string
                  nullable: true
                  description: Refresh token (for refresh_token grant)
                clientId:
                  type: string
                  nullable: true
                  description: Client ID (for client_credentials grant)
                clientSecret:
                  type: string
                  nullable: true
                  description: Client secret (for client_credentials grant)
                redirectUri:
                  type: string
                  nullable: true
                  description: Redirect URI (for authorization_code grant)
              required:
                - grantType
      responses:
        '200':
          description: Token acquired
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/Token'
components:
  schemas:
    Token:
      type: object
      description: OAuth2/OIDC token response
      properties:
        accessToken:
          type: string
          description: JWT access token
        tokenType:
          type: string
          enum:
            - Bearer
          description: Token type
        expiresIn:
          type: number
          description: Token expiry in seconds
        refreshToken:
          type: string
          nullable: true
          description: Refresh token for token renewal
        idToken:
          type: string
          nullable: true
          description: OIDC ID token
        scope:
          type: string
          description: Granted scopes
      required:
        - accessToken
        - tokenType
        - expiresIn

````