# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sudoplatform.com/guides/identity-verification/check-secure-id-verification-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
