---
updatedAt: 2025-03-06T23:35:18.000Z
agentTools:
  projectIndex: https://docs.tenyks.ai/llms.txt
---

# Generate Access Token

This endpoint generates an acccess token to be used as a Bearer token on all the other endpoints.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "API Endpoints",
    "version": "1.0.1"
  },
  "servers": [
    {
      "url": "https://{base_url}.tenyks.ai",
      "description": "The Tenyks API",
      "variables": {
        "base_url": {
          "enum": [
            "dashboard",
            "sandbox"
          ],
          "default": "dashboard"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Auth"
    }
  ],
  "paths": {
    "/api/auth/apikey": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Generate Access Token",
        "description": "This endpoint generates an acccess token to be used as a Bearer token on all the other endpoints.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string"
                  },
                  "api_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```