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

# Generar Access Token

> Creación del access token

Obtiene credenciales **idToken** y **refreshToken** usando la **API Key** de la empresa.

## Endpoint

`GET /authentication/generate-access-token`

> Este endpoint es **GET** y **no acepta cuerpo**. Envíe el encabezado `authorization: ApiKey <su_api_key>`.

**Encabezados**

```http theme={null}
authorization: ApiKey sk_live_xxx
```

## Respuestas

### Response - Éxito

```json theme={null}
{
"status": "OK",
"data":{
  "idToken": "eyJhbGciOi...",
  "refreshToken": "AbCdEf...123",
  "expiresIn": 3600,
  "userId": null
  }
}
```

### 500 — Solicitud Incorrecta

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Error del Cliente

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```

**Ejemplo cURL**

```bash theme={null}
curl -X GET "https://gateway.orkeia.ai/authentication/generate-access-token"           -H "authorization: ApiKey sk_live_xxx"
```
