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

# Verification SDK

> Manage verifications from any app using @scute/js-core

# Verification SDK

List, approve, deny verifications from client-side code. User must be authenticated first.

```bash theme={null}
npm install @scute/js-core
```

```typescript theme={null}
import { createClient } from "@scute/js-core";
const scute = createClient({ appId: "your-app-id" });

await scute.signInOrUp("user@example.com");
// scute.verifications is now ready
```

***

## Methods

### List

```typescript theme={null}
const { data } = await scute.verifications.list({ status: "pending" });
// data.verifications: Verification[]
```

### Get

```typescript theme={null}
const { data } = await scute.verifications.getById("id");
```

### Approve

```typescript theme={null}
await scute.verifications.approve("id");
```

### Deny

```typescript theme={null}
await scute.verifications.deny("id", "reason");
```

### Verify OTP

```typescript theme={null}
await scute.verifications.verifyCode("id", "847293");
```

### Resend

```typescript theme={null}
await scute.verifications.resend("id");
```

### Cancel

```typescript theme={null}
await scute.verifications.cancel("id");
```

***

## Subscribe to new verifications

Polls for pending verifications. Returns an unsubscribe function.

```typescript theme={null}
const unsub = scute.verifications.onNew((v) => {
  console.log(v.intent, v.identifier);
});

// stop
unsub();
```

Custom interval (default 3s):

```typescript theme={null}
scute.verifications.onNew(callback, 5000);
```

***

## Statuses

| Status      | Meaning      |
| ----------- | ------------ |
| `pending`   | Waiting      |
| `verified`  | Approved     |
| `denied`    | Denied       |
| `expired`   | Timed out    |
| `failed`    | Max attempts |
| `cancelled` | Cancelled    |

***

## Notes

* User must authenticate through Scute before calling any method
* Auth headers are handled automatically by the SDK
* Users only see verifications sent to them
* Works in browser, Electron, React Native — anywhere `@scute/js-core` runs
