API reference, Phone number input

Complete Silent Network Authentication (SNA)

POSThttps://demo-api.incodesmile.com/omni/sna/complete

Finishes the check started by POST /omni/sna/initiate. Send the checkId from the initiate response together with the code obtained when the device followed checkUrl.

The endpoint always answers HTTP 200. When match is true the phone number is marked as verified on the session, the same as a successful SMS OTP. When success is false the check did not confirm the number and shouldFallbackToOtp is true: either let the user try another phone number (when the flow has snaRetryWithNewPhone enabled) or continue with GET /omni/send/otp and GET /omni/compare/otp?code={code} for the same number (both accept the same LIMITED token and default to SMS).

Headers

api-versionstringrequiredDefaults to 1.0

Request body

application/json

checkIdstringrequired

`checkId` returned by `POST /omni/sna/initiate`.

codestringrequired

Code returned to the device by the redirect at the end of `checkUrl`.

Responses

Response body (application/json)

successboolean

`true` when the provider confirmed the device owns the phone number.

methodstring

Verification method, always `SNA` for this endpoint.

enumSNA
checkIdstring

Identifier of the SNA check, echoed from the request.

statusstring

Provider status of the check as returned by the provider, normally `COMPLETED`. `ERROR` when the check could not be completed; `PENDING` or `EXPIRED` when the device never finished `checkUrl`, in which case `match` is `false` and the client must fall back to SMS OTP.

enumACCEPTEDPENDINGCOMPLETEDEXPIREDERROR
matchboolean

`true` when the device matched the phone number, `false` when it did not. `null` when the provider reported an error before producing a result.

completeboolean

`true` when the check reached a final state and must not be completed again.

shouldFallbackToOtpboolean

`true` whenever `success` is `false`: the client must verify the number with SMS OTP (or let the user enter another number when the flow has `snaRetryWithNewPhone` enabled).

messagestring

Human readable outcome, for logging. Not meant to be shown to the end user.

errorCodestring

Present when `success` is `false`. `NO_MATCH`: the device does not own the number. `VERIFICATION_ERROR`: the check could not be completed. Any other value is the provider's own error code.

Was this page helpful?