Integrate Reclaim Protocol end to end using our agent
logoReclaim Protocol Docs

Usage

Integrate Reclaim Protocol using Kotlin

Quickstart

Import

import org.reclaimprotocol.inapp_sdk.ReclaimVerification

Create a request object

Using credentials from AndroidManifest.xml:

val request = ReclaimVerification.Request(
    appId = "YOUR_APP_ID",
    secret = "YOUR_APP_SECRET",
    providerId = "YOUR_PROVIDER_ID"
)

Start the verification flow

ReclaimVerification.startVerification(
    context = context,
    request = request,
    handler = object : ReclaimVerification.ResultHandler {
        override fun onException(exception: ReclaimVerification.ReclaimVerificationException) {
            // Proof generation or verification failed
        }
 
        override fun onResponse(response: ReclaimVerification.Response) {
            // Proof generated and verified successfully
        }
    }
)

The returned result ReclaimVerification.ResultHandler.onResponse in is a ReclaimVerification.Response object. This object contains a response that has proofs, exception, and the sessionId if the verification is successful.

If the verification is cancelled or failed, the handler's ReclaimVerification.ResultHandler.onException method is called with a ReclaimVerification.ReclaimVerificationException object.

Example

Complete Android example with Jetpack Compose

On this page