Skip to main content
verify() tells you about problems in two ways:
  • The verification didn’t start. verify() throws SdkError.Refused in Swift or SdkException.Refused in Kotlin, with a code from the table below. Except for not_configured, the SDK has already shown the user its refusal screen, so your app doesn’t need to show another. Any other error also means it didn’t start, and the SDK has shown its refusal screen for it too.
  • A platform failed. The verification ran, and verify() returns normally. That platform’s status is failed, and your server gets the details by webhook. See A platform that failed.
Never retry automatically. Don’t call verify() again behind the user’s back. After a refusal or a failure, the user chooses whether to start again.

Refusal codes

The refusal screen reads “This device can’t be verified” for device_not_verified, and “Verification isn’t available right now” for every other code. You can change both texts with the refusal.device and refusal.other strings. platforms_invalid, platform_unavailable, reference_invalid and token_invalid come from your code or your setup, so fix them before you release. account_inactive comes from your account.

Handling a refusal

Other errors

Any other SdkError or SdkException case means the verification couldn’t start, most often Transport when the phone can’t reach Cr3dentials. The SDK has already shown its refusal screen (“Verification isn’t available right now”) for it too, unless your app cancelled the call, so you don’t need to show another. Let the user start again when they choose. Once a verification has started, verify() returns an outcome however its platforms end, and doesn’t throw.

A platform that failed

When a platform fails, the SDK shows ” couldn’t be verified” and moves on to the next platform. Then:
  • verify() returns that platform with the status failed, and a reason for your logs.
  • Your server gets that platform’s platform.finished webhook with "status": "failed", "result": null and an error object with a code and a message. See Webhooks.
A platform the SDK handed to an attester is done in the outcome. If its result then never reaches Cr3dentials, the run fails about 2 hours after the verification started, with the error code no_result, and its webhook says so. This needs your app to have reported the hand-off at the end of the flow. If it was killed or offline before then, and no result arrives, the platform ends as not_started in verification.finished, with no platform.finished. To try a failed platform again, the user starts a new verify() with that platform.

Getting help

Email info@cr3dentials.xyz with the SDK version, the device and OS, the refusal code or the platform’s reason, the time, and the verificationId. Never send your Partner API key, your webhook secret, cookies or user data.