> For the complete documentation index, see [llms.txt](https://docs.sudoplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sudoplatform.com/guides/identity-verification/check-secure-id-verification-status.md).

# Check Secure ID Verification Status

To check the identity verification status of a user, such as to determine if verification is required:

{% tabs %}
{% tab title="Swift" %}

```swift
do {
    let verifiedIdentity = try await identityVerificationClient.checkIdentityVerification(option: .remoteOnly)
    if verifiedIdentity.verified {
        // Identity was verified succcessfully.
        switch verifiedIdentity.verificationMethod {
        case VerificationMethod.knowledgeOfPii:
            // provide access to regulated service
        case VerificationMethod.governmentId:
            // perhaps provide a different level of service, e.g. higher 
            // entitlements
        }
    } else {
        // Identity could not be verified.
    }
} catch {
    // Handle error. An error may be thrown if the backend is unable to perform
    // requested operation due to availability or security issues.
    // An error might be also be thrown for unrecoverable circumstances arising
    // from programmatic error or configuration error. For example, if the keychain
    // access entitlement is not set up correctly or basic system resources are
    // unavailable.
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
CoroutineScope(Dispatchers.IO).launch {
    try {
        // verifiedIdentity: result of the last verification attempt.
        val verifiedIdentity = identityVerificationClient.checkIdentityVerification()
        if (verifiedIdentity.verified) {
            when (verifiedIdentity.verificationMethod) {
                is VerificationMethod.KNOWLEDGE_OF_PII -> {
                    // provide access to regulated service
                }
                is VerificationMethod.GOVERNMENT_ID -> {
                    // perhaps provide a different level of service, e.g. higher 
                    // entitlements
                }
            }
        }
    } catch (e: SudoIdentityVerificationException) {
        // Handle errors.
    }
}
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
try {
  const verifiedIdentity = await identityVerificationClient.checkIdentityVerification()
  if (verifiedIdentity.verified) {
    // Identity was verified succcessfully.
    switch (verifiedIdentity.verificationMethod) {
      case VerificationMethod.KnowledgeOfPII:
        // provide access to regulated service
        break
      case VerificationMethod.GovernmentID:
        // perhaps provide a different level of service, e.g. higher 
        // entitlements
        break
    }
  } else {
    // Identity could not be verified.
  }
}
catch (err) {
  // Handle errors
}
```

{% endtab %}
{% endtabs %}

The `checkIdentityVerification` API returns the same information as the `verifyIdentity` , `verifyIdentityDocument` and `captureAndVerifyIdentityDocument` APIs.
