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

# OAuth2 Client Credentials

> Using an API Key created in our Dashboard, exchange it for a JWT access token



## OpenAPI

````yaml post /oauth/token
openapi: 3.0.3
info:
  title: Cavok Cloud - OpenAPI 3.0
  description: This is the OpenAPI 3.0 documentation for Cavok Cloud API.
  termsOfService: https://docs.cavok.dev/terms
  contact:
    name: Discord Support
    url: https://discord.gg/hRzryzg3cz
  version: 1.1.0
servers:
  - url: https://resource.cavok.dev/api/v1
security: []
tags:
  - name: Open Endpoints
    description: These do not ask for authorization token
  - name: Auth
    description: How to authenticate with the API
  - name: Account
    description: Operations about Accounts (Cloud ID account)
externalDocs:
  description: Documentation
  url: https://docs.cavok.dev
paths:
  /oauth/token:
    post:
      tags:
        - Auth
      summary: OAuth2 Client Credentials
      description: >-
        Using an API Key created in our Dashboard, exchange it for a JWT access
        token
      operationId: getToken
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Token'
        '404':
          description: API Key invalid
components:
  schemas:
    StandardResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          nullable: false
        data:
          type: object
          nullable: true
        message:
          type: string
          default: null
          nullable: true
    Token:
      type: object
      properties:
        access_token:
          type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
        token_type:
          type: string
          example: Bearer
        expires_in:
          type: number
          example: 14400
          description: Expiration time in seconds

````