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.
| Field | Values |
|---|---|
| purpose | authenticate, mfa, step_up, verify_contact, verify_identity, change_identifier, custom |
| method | email_otp, sms_otp, magic_link, totp, backup_code, webauthn, oauth, push, entra_push (Microsoft Authenticator), duo |
| status | pending, 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:
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.
| Claim | Value |
|---|---|
| iss | "scute" |
| aud | The UUID of the app that issued the token |
| sub | The verified user's email |
| verification_id | The challenge ID |
| intent | The intent you sent |
| verified_at | When the person completed the verification, Unix seconds |
| iat, exp | Issued and expiry times |
| consent | "approved", in consent mode only |
| msp_id, msp_app_id | For verifications routed through an MSP |
| ticket_id, contact_id, contact_name, company_id, contact_email | Echoed 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:
| Mode | Behavior |
|---|---|
| dismiss (default) | The person proves who they are. |
| consent | The 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.