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

# Generate Access Token

> Creation of the access token

It obtains **idToken** and **refreshToken** credentials using the company's **API Key**.

## Endpoint

`GET /authentication/generate-access-token`

> This endpoint is **GET** and **does not accept a body**. Send the header `authorization: ApiKey <your_api_key>`.

**Headers**

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

## Responses

### 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
}
```

**cURL Example**

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