> ## 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.

# Gerar Access Token

> Criação do access token

Obtém credenciais **idToken** e **refreshToken** usando a **API Key** da empresa.

## Endpoint

`GET /authentication/generate-access-token`

> Este endpoint é **GET** e **não aceita corpo**. Envie o cabeçalho `authorization: ApiKey <sua_api_key>`.

**Cabeçalhos**

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

## Respostas

### Response - Success

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

### 500 — Bad Request

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

### 400 — Client Error

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

**Exemplo cURL**

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