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

# check()

> Run a background identification and handle checks skipped by the visit cooldown.

Use `agent.check()` for background traffic coverage. It uses the browser agent's five-minute same-user visit cooldown.

```ts theme={null}
import { load } from '@shieldlabs-ai/js';

const agent = await load({ publicKey: 'PUBLIC_API_KEY' });
const result = await agent.check({ userId: 'HASHED_USER_ID' });

if (result !== null) {
  console.log(result.requestId);
}
```

## Options

`check(options?)` accepts the same [`IdentifyOptions`](https://docs.shieldlabs.ai/api/js-identify#options) as `identify()`: optional `userId` and `timeout`.

## Return value

`Promise<IdentifyResult | null>` resolves to the [identification result](https://docs.shieldlabs.ai/api/js-identify.md#return-value) when a check starts. It resolves to `null` when initialization does not produce an Identification ID, including a skipped cooldown call.

A null result is not a stored risk verdict or proof of a successful identification. The SDK converts the agent's `not_initialized` outcome to null; other errors still reject.

## Visit cooldown

Regular checks run at most once every five minutes for the same user within a visit. A suppressed call creates no identification and consumes no volume. A full page load can begin a new visit; this is not a fixed limit for the entire browsing session.

Use [`identify()`](https://docs.shieldlabs.ai/api/js-identify) when a protected action needs a fresh Identification ID. See [snippet methods](https://docs.shieldlabs.ai/api/js-snippet.md) for the corresponding CDN exports.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.