***

title: hasBearerAuth
slug: /reference/typescript/agents/configuration/auth-handler/has-bearer-auth
description: Check whether Bearer token authentication is configured.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Check whether Bearer token authentication is configured on this handler.

## **Parameters**

None.

## **Returns**

`boolean` -- `true` if a bearer token has been set.

## **Example**

```typescript {7}
import { AuthHandler } from '@signalwire/sdk';

const auth = new AuthHandler({
  bearerToken: 'my-secret-token',
});

console.log(auth.hasBearerAuth()); // true
```