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

# Class: AuthInterceptor

> AuthInterceptor reference for the Terminal49 TypeScript SDK, attaching the API token as a bearer Authorization header on every outgoing request from the client.

# Class: AuthInterceptor

## Constructors

### Constructor

> **new AuthInterceptor**(`apiToken`, `accountId?`): `AuthInterceptor`

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `apiToken`   | `string` |
| `accountId?` | `string` |

#### Returns

`AuthInterceptor`

## Methods

### onRequest()

> **onRequest**(`__namedParameters`): `Request`

#### Parameters

| Parameter           | Type                                                       |
| ------------------- | ---------------------------------------------------------- |
| `__namedParameters` | `Pick`\<`MiddlewareCallbackParams`, `"id"` \| `"request"`> |

#### Returns

`Request`
