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

# WebSocket

## Interfaces

### GetWebSocketAuthHeadersOptions

Defined in: [utils/ws.ts:11](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L11)

Options for generating WebSocket authentication headers.

#### Properties

##### apiKeyId

```ts theme={null}
apiKeyId: string;
```

Defined in: [utils/ws.ts:19](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L19)

The API key ID

Examples:
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
'organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

##### apiKeySecret

```ts theme={null}
apiKeySecret: string;
```

Defined in: [utils/ws.ts:28](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L28)

The API key secret

Examples:
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==' (Edwards key (Ed25519))
'-----BEGIN EC PRIVATE KEY-----\n...\n...\n...==\n-----END EC PRIVATE KEY-----\n' (EC key (ES256))

##### source?

```ts theme={null}
optional source: string;
```

Defined in: [utils/ws.ts:33](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L33)

The source identifier for the request

##### sourceVersion?

```ts theme={null}
optional sourceVersion: string;
```

Defined in: [utils/ws.ts:38](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L38)

The version of the source making the request

##### expiresIn?

```ts theme={null}
optional expiresIn: number;
```

Defined in: [utils/ws.ts:43](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L43)

Optional expiration time in seconds (defaults to 120)

##### audience?

```ts theme={null}
optional audience: string[];
```

Defined in: [utils/ws.ts:48](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/auth/utils/ws.ts#L48)

Optional audience claim for the JWT

## Functions

* [getWebSocketAuthHeaders](/sdks/cdp-sdks-v2/typescript/auth/WebSocket/getWebSocketAuthHeaders)
