Skip to main content

Verification SDK

List, approve, deny verifications from client-side code. User must be authenticated first.
npm install @scute/js-core
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

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

Get

const { data } = await scute.verifications.getById("id");

Approve

await scute.verifications.approve("id");

Deny

await scute.verifications.deny("id", "reason");

Verify OTP

await scute.verifications.verifyCode("id", "847293");

Resend

await scute.verifications.resend("id");

Cancel

await scute.verifications.cancel("id");

Subscribe to new verifications

Polls for pending verifications. Returns an unsubscribe function.
const unsub = scute.verifications.onNew((v) => {
  console.log(v.intent, v.identifier);
});

// stop
unsub();
Custom interval (default 3s):
scute.verifications.onNew(callback, 5000);

Statuses

StatusMeaning
pendingWaiting
verifiedApproved
deniedDenied
expiredTimed out
failedMax attempts
cancelledCancelled

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