---
updatedAt: 2026-07-28T13:49:18.000Z
agentTools:
  projectIndex: https://kitchenhub.readme.io/llms.txt
---

# Create pair tokens

Creating access and refresh tokens for authentication

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "API reference",
    "description": "swagger ui demo.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kitchenhub.app",
      "description": "KitchenHub API url"
    }
  ],
  "paths": {
    "/v2/auth/token/": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Create pair tokens",
        "description": "Creating access and refresh tokens for authentication",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ObtainTokenRequestSerializer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObtainTokenResponseSerializer"
                }
              }
            },
            "links": {}
          },
          "400": {
            "description": "Invalid client secret key",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "403": {
            "description": "Company access denied. Account is blocked",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "404": {
            "description": "Company not found",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "424": {
            "description": "Error on provider side. Please try again later",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "500": {
            "description": "Technical error. Please contact support to resolve this issue",
            "content": {
              "application/json": {}
            },
            "links": {}
          },
          "501": {
            "description": "Provider is not supported or not implemented yet",
            "content": {
              "application/json": {}
            },
            "links": {}
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "ObtainTokenResponseSerializer": {
        "title": "ObtainTokenResponseSerializer",
        "type": "object",
        "properties": {
          "access_token": {
            "title": "Access Token",
            "description": "Access token",
            "type": "string"
          },
          "refresh_token": {
            "title": "Refresh Token",
            "description": "Refresh token",
            "type": "string"
          },
          "access_token_expire": {
            "title": "Access Token Expire",
            "description": "Access token expire time in minutes",
            "type": "integer"
          },
          "refresh_token_expire": {
            "title": "Refresh Token Expire",
            "description": "Refresh token expire time in minutes",
            "type": "integer"
          }
        },
        "required": [
          "access_token",
          "refresh_token",
          "access_token_expire",
          "refresh_token_expire"
        ]
      },
      "ObtainTokenRequestSerializer": {
        "title": "ObtainTokenRequestSerializer",
        "type": "object",
        "properties": {
          "client_id": {
            "title": "Client Id",
            "description": "Client id from kitchenHub system",
            "type": "string"
          },
          "client_secret": {
            "title": "Client Secret",
            "description": "Client secret from kitchenHub system",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "client_secret"
        ]
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "description": "Enter the token with the `Bearer: ` prefix, e.g. 'Bearer abcde12345'.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}
```