---
updatedAt: 2026-01-12T14:04:45.000Z
agentTools:
  projectIndex: https://docs.labra.io/llms.txt
---

# /v1/oauth/token

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Identity Server API",
    "description": "Merged specification for Identity Server (3 endpoints)",
    "version": "1.0.0"
  },
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "servers": [
    {
      "url": "https://api.labra.io/identity"
    }
  ],
  "paths": {
    "/v1/oauth/token": {
      "post": {
        "operationId": "LabraOauthController_labraToken",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Labrav_Identity_Service_CreateTokenDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response with status code 201"
          }
        },
        "tags": [
          "OAuth"
        ],
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "Labrav_Identity_Service_CreateTokenDto": {
        "type": "object",
        "properties": {
          "grantType": {
            "type": "string",
            "enum": [
              "client_credentials"
            ],
            "description": "grant type"
          },
          "clientId": {
            "type": "string",
            "description": "client id"
          },
          "clientSecret": {
            "type": "string",
            "description": "client secret"
          },
          "customClaims": {
            "type": "object",
            "description": "custom claims to be added in token",
            "example": {
              "test": "test"
            }
          },
          "ttl": {
            "type": "number",
            "description": "time to live in seconds",
            "example": 3600,
            "default": 3600
          }
        },
        "required": [
          "grantType",
          "clientId",
          "clientSecret"
        ]
      }
    }
  },
  "security": []
}
```