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

# Oauth Token



## OpenAPI

````yaml /api-reference/openapi.fr.json post /oauth/token
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /oauth/token:
    post:
      tags:
        - oauth
      summary: Oauth Token
      operationId: oauth_token_oauth_token_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_oauth_token_oauth_token_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_oauth_token_oauth_token_post:
      properties:
        grant_type:
          type: string
          title: Grant Type
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        redirect_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirect Uri
        client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Id
        code_verifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Code Verifier
        refresh_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Refresh Token
      type: object
      required:
        - grant_type
      title: Body_oauth_token_oauth_token_post
    OAuthTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        expires_in:
          type: integer
          title: Expires In
        scope:
          type: string
          title: Scope
        refresh_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Refresh Token
      type: object
      required:
        - access_token
        - expires_in
        - scope
      title: OAuthTokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````