A one-time code signs a person in with a code sent to their email or phone. An email identifier gets an email code, a phone identifier gets an SMS code.
For email, the app's email method has to be set to codes; with sign-in links selected, these routes return 403 sign_in_method_disabled with details.method email_code. For phone, phone sign-in has to be on for the app and SMS on for the workspace.
Send a code#
/v1/auth/:app_id/otps/loginNonecurl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/otps/login \ -H "Content-Type: application/json" \ -d '{"identifier": "+14155551234"}'{ "otp": { "success": true, "sent_at": "2026-11-19T14:04:05.000+00:00", "id": "ch_zN4kP2qX9wT5aB3xY9QkLm7RsT2uVw8E" }, "user_id": "ch_zN4kP2qX9wT5aB3xY9QkLm7RsT2uVw8E", "user_meta_errors": null}otp.id and user_id carry the same value: the token of the code's challenge. Send it back as user_id when you verify.
| Status | error_code | When |
|---|---|---|
| 400 | invalid_identifier | Missing or invalid email or phone. |
| 403 | sign_in_method_disabled | Email or phone sign-in, or email codes, are off for the app. |
| 422 | sms_unavailable | SMS is off for the workspace. |
| 422 | sms_country_not_allowed | The app does not allow texts to this country. |
| 422 | sms_not_configured | No SMS provider is set up for the app. |
| 422 | invalid_phone_number | The SMS provider rejected the number. |
| 429 | More than 5 sends to the same identifier in a minute. | |
| 503 | sms_delivery_failed | The SMS could not be sent. Try again. |
The sign-in refusals apply.
Verify a code#
/v1/auth/:app_id/otps/verifyNonecurl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/otps/verify \ -H "Content-Type: application/json" \ -d '{"user_id": "ch_zN4kP2qX9wT5aB3xY9QkLm7RsT2uVw8E", "otp": "482913"}'Returns a token set with status 200, or the next sign-in step.
| Status | error_code | When |
|---|---|---|
| 400 | otp_required | otp is missing. |
| 400 | invalid_otp | Wrong or expired code. On an app with sign-up closed, also an unknown user_id. |
| 403 | security_block | Attack protection refused the sign-in. |
| 404 | challenge_not_found | No sign-in code matches user_id. |
| 404 | user_not_found | The code has no person attached. |
| 429 | More than 30 code submissions from one IP address in a minute. |
Only sign-in codes are accepted. A code created for another purpose (step-up, contact confirmation, a verification) is never exchanged for a session here.