# AtloriaAPIClient

**Kind:** Class

**Source:** [`atloria-monorepo/packages/api-client/src/AtloriaAPIClient.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/api-client/src/AtloriaAPIClient.ts#L22)

Main Atloria API client
Provides a unified interface for all API operations

## Methods

| Method | Signature | Returns |
|---|---|---|
| `getInterceptors` | `getInterceptors()` | `InterceptorManager` |
| `setToken` | `setToken(token: string)` | `void` |
| `getToken` | `getToken()` | `string` |
| `initWebSocket` | `initWebSocket(url: string, config: WebSocketConfig)` | `WebSocketClient` |
| `getWebSocket` | `getWebSocket()` | `WebSocketClient | null` |
| `disconnectWebSocket` | `disconnectWebSocket()` | `void` |
| `login` | `login(email: string, password: string)` | `Promise<void>` |
| `logout` | `logout()` | `Promise<void>` |
| `refreshToken` | `refreshToken()` | `Promise<void>` |

## Properties

| Property | Type |
|---|---|
| `audiences` | `AudienceEndpoints` |
| `audit` | `AuditEndpoints` |
| `auth` | `AuthEndpoints` |
| `changeRequests` | `ChangeRequestEndpoints` |
| `comments` | `CommentEndpoints` |
| `docsConfig` | `DocsConfigEndpoints` |
| `documents` | `DocumentEndpoints` |
| `projects` | `ProjectEndpoints` |
| `suggestions` | `SuggestionEndpoints` |
| `users` | `UserEndpoints` |

## Where it refuses work

- `AtloriaAPIClient` stops the work with `Error` when `!token` — “Authentication token required for WebSocket connection”.
