Get started

Verification

Verify a person on demand with a challenge, and read the result from a webhook, the API or the signed scute_token.

A verification proves that the person on the other end controls an email address, a phone number or an enrolled factor, at the moment you ask. Use it before a helpdesk agent resets a password, before an approval, or before any action where you need to know who is asking. Each verification is a challenge.

Challenges#

A challenge has a purpose, a method and a status.

FieldValues
purposeauthenticate, mfa, step_up, verify_contact, verify_identity, change_identifier, custom
methodemail_otp, sms_otp, magic_link, totp, backup_code, webauthn, oauth, push, entra_push (Microsoft Authenticator), duo
statuspending, then completed, failed, expired, cancelled or denied. API responses report completed as verified.

For on-demand verification use purpose: "verify_identity". It is the default on the workspace endpoint, and magic_link is the default method there.

Create a verification#

Your backend creates the challenge with the app key:

cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/challenges \  -H "Authorization: Bearer $SCUTE_SECRET" \  -H "Content-Type: application/json" \  -d '{    "purpose": "verify_identity",    "method": "sms_otp",    "app_user_id": "0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee",    "intent": "password_reset",    "metadata": { "ticket_id": "TKT-4821" }  }'

The response is 201 with challenge: its token, status (pending), method and expires_at.

  • Name the person with app_user_id or identifier (an email or phone number).
  • intent is a label for why the check is happening. intent_name and reason are accepted as aliases.
  • metadata is stored on the challenge and returned in the result, so you can match it to your ticket or request.
  • delivery_channel (email or sms) picks how a magic link is sent.
  • callback_url receives the result when the challenge ends.

MSP integrations create challenges on the workspace instead, with POST /v1/workspaces/:workspace_id/challenges, a workspace key and an M2M token. See API reference.

Challenges can also be sent from the dashboard (Challenges).

Read the result#

The result reaches you in up to three ways:

  • Webhook. Subscribe an endpoint to challenge events such as challenge.completed, challenge.failed, challenge.denied, challenge.expired and challenge.cancelled. Deliveries are signed with HMAC-SHA256 in X-Webhook-Signature: t=<timestamp>,v1=<hex>.
  • API. GET /v1/auth/:app_id/challenges/:token returns the challenge with its status, attempts, remaining_attempts, metadata and timestamps.
  • scute_token on the redirect. When the person completes a hosted verification page, Scute redirects them to your redirect URL with a signed scute_token.

The scute_token#

scute_token is a JWT signed with RS256 by the workspace key. It is added to the redirect URL as a query parameter, or as a fragment (#scute_token=...) when the app turns on verification_token_in_fragment. The redirect host must be on the app's allowlist.

It expires 60 seconds after it is issued (exp = iat + 60). Verify it as soon as it arrives, against the app's JWKS at https://api.scute.io/v1/auth/:app_id/.well-known/jwks.json, and create your own session from it.

ClaimValue
iss"scute"
audThe UUID of the app that issued the token
subThe verified user's email
verification_idThe challenge ID
intentThe intent you sent
verified_atWhen the person completed the verification, Unix seconds
iat, expIssued and expiry times
consent"approved", in consent mode only
msp_id, msp_app_idFor verifications routed through an MSP
ticket_id, contact_id, contact_name, company_id, contact_emailEchoed from metadata when you sent them

Unlike an access token, scute_token has iss and aud. Check aud against the app's UUID, not its app_... ID.

Modes#

The app setting verification_mode decides what the person does on the hosted page:

ModeBehavior
dismiss (default)The person proves who they are.
consentThe person proves who they are, then approves or denies the action. A denied consent issues no token.

Risk score#

Each verification gets a risk score: score (0 to 100), level (low, medium, high, critical), signals (for example ip_mismatch, unknown_device, phone_country_mismatch, rapid_reverification) and a recommendation (allow, review, verify, block).

Pending verifications in your app#

scute.verifications in @scute/js-core lists the signed-in user's pending verification requests and lets them approve, deny or enter a code: list, getById, approve, deny, verifyCode, resend, cancel, and onNew for new requests.