---
title: "@supertokens-plugins/captcha-nodejs"
description: "Public root exports for @supertokens-plugins/captcha-nodejs 0.2.1."
---

**Package version:** `0.2.1`

Generated from the packed release's root declaration, `dist/index.d.ts`. Only exports reachable from that root are
listed. See the [immutable release source](https://github.com/supertokens/supertokens-plugins/blob/%40supertokens-plugins%2Fcaptcha-nodejs%400.2.1/packages/captcha-nodejs/src/index.ts).

## Public root exports

| Export | Kind |
| --- | --- |
| `default` | Constant |
| `init` | Constant |
| `PLUGIN_ID` | Constant |
| `SuperTokensPluginCaptchaConfig` | Type |

## `default`

Published from the emitted `_default` declaration.

Root export:

```ts check=false reason="Generated API signature"
export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
import * as supertokens_node_types from 'supertokens-node/types';
declare const _default: {
    init: (config: SuperTokensPluginCaptchaConfig) => supertokens_node_types.SuperTokensPlugin;
};
```

## `init`

Root export:

```ts check=false reason="Generated API signature"
export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
import { SuperTokensPlugin } from 'supertokens-node/types';
declare const init: (config: SuperTokensPluginCaptchaConfig) => SuperTokensPlugin;
```

## `PLUGIN_ID`

Root export:

```ts check=false reason="Generated API signature"
export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
declare const PLUGIN_ID = "supertokens-plugin-captcha";
```

## `SuperTokensPluginCaptchaConfig`

Root export:

```ts check=false reason="Generated API signature"
export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
type SuperTokensPluginCaptchaConfig = {
    type: "reCAPTCHAv3" | "reCAPTCHAv2" | "turnstile";
    captcha: {
        secretKey: string;
    };
    shouldValidate?: ShouldValidate;
};
```

## Required signature types

These declarations are not additional package-root exports. They are included because the public signatures above depend on them.

### `ShouldValidate`

```ts check=false reason="Generated API signature"
import { APIInterface } from 'supertokens-node/recipe/emailpassword/types';
import { APIInterface as APIInterface$1 } from 'supertokens-node/recipe/passwordless/types';
interface ShouldValidate {
    (api: "signInPOST", input: Parameters<NonNullable<APIInterface["signInPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "signUpPOST", input: Parameters<NonNullable<APIInterface["signUpPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "passwordResetPOST", input: Parameters<NonNullable<APIInterface["passwordResetPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "generatePasswordResetTokenPOST", input: Parameters<NonNullable<APIInterface["generatePasswordResetTokenPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "consumeCodePOST", input: Parameters<NonNullable<APIInterface$1["consumeCodePOST"]>>[0]): boolean | Promise<boolean>;
    (api: "createCodePOST", input: Parameters<NonNullable<APIInterface$1["createCodePOST"]>>[0]): boolean | Promise<boolean>;
    (api: "consumeCodePOST", input: Parameters<NonNullable<APIInterface$1["consumeCodePOST"]>>[0]): boolean | Promise<boolean>;
}
```
