How it works
Self Enterprise is the managed way to integrate Self: you configure a flow in the dashboard, call one SDK, and receive a signed result.- Configure. In the Self dashboard you pick a workspace (for example Age Verification), set the rule, and deploy a flow. One flow serves both the test and the live environment; the API key you use decides which.
- Start a session. Your backend creates a verification session for the flow with the Enterprise SDK and gets back a verification URL.
- Prove. The user opens the URL in the Self app, which generates a zero-knowledge proof over their document and discloses only the attributes the flow asks for, such as “over 18” or “not on a sanctions list”. The document data never leaves the phone.
- Receive the result. Self sends a signed
verification.completedwebhook to your backend and, in on-chain mode, also mints a soulbound token to the user’s wallet on Celo.
What you can check
Each verification starts from one of Self’s workspaces:
Supported documents are biometric passports (NFC chip, 60+ countries), Indian Aadhaar, and partner-issued KYC attestations. The full list is on Self’s supported documents and supported countries pages.
Get started
- Sign in at the Self dashboard. Self creates your organization on first sign-in.
-
Open a workspace, create a config, set the rule, and deploy the flow. Copy its
flowId. -
Under Developer → API keys, generate a test key and store it as
SELF_API_KEY. It is shown once. -
Install the SDK:
-
Create a session for the
flowIdfrom your backend and hand the returned verification URL to the user. The quickstart shows the call. -
Under Developer → Webhooks, add your handler URL and store the signing secret as
SELF_WEBHOOK_SECRET. Verify every delivery with the SDK before you trust it; the webhook events page lists the payload fields. - Test the loop with a mock passport generated in the Self app (Settings → Manage ID documents → Generate Mock Document). The flow’s activity log shows the result.
Verify on-chain
Backend mode is the default and records nothing on chain. A flow set to on-chain mode verifies the proof in a smart contract on Celo instead of on Self’s servers. You still get the same webhook, which then also carries the transaction hash and contract address. Self deploys one soulbound ERC-721 contract per flow and environment (nameSelf Verification SBT, symbol SELFSBT), pays the gas, and mints a token to the user’s wallet when the proof passes. The contract enforces minimum age, country lists, OFAC and security level; a maximum age cannot be enforced on-chain.
- Test flows mint on Celo Sepolia (chain ID 11142220); live flows mint on Celo mainnet (chain ID 42220).
- The receiving wallet must be an externally owned account. Smart-contract wallets cannot receive the SBT.
- One person can verify once per flow, and one wallet can hold one SBT per flow. Tokens cannot be transferred, approved or burned.
- Any contract gates access by calling
balanceOf(wallet)on the flow’s SBT contract: a non-zero balance means the wallet passed.
Self Connect
Self Connect maps off-chain identifiers such as phone numbers, email addresses and social handles to Celo addresses, so a user can pay a contact by phone number instead of a hex address. It is federated: any issuer can verify that a user owns an identifier (by SMS, OAuth or custom logic) and register the mapping as an attestation in the on-chainFederatedAttestations registry. Identifiers are obfuscated through ODIS before they are stored, and lookups need no gas. MiniPay uses it to resolve phone numbers; see Resolve MiniPay phone numbers to addresses. The contracts and SDK keep the SocialConnect name: celo-org/social-connect and @celo/identity.
Self documents the protocol: start with the Self Connect overview, then becoming an issuer and the SDK integration with viem. ODIS query patterns with ContractKit are on Querying on-chain identifiers with ODIS.
Troubleshooting
- Webhook signature fails. Pass the raw request body to the SDK’s verify function, not a parsed JSON object.
- Mock passport rejected on a live flow. Live sessions accept only real documents; test sessions accept only mock ones. A flow has one
flowIdfor both environments, and the API key decides: check whether the session was created with ansk_test_or ansk_live_key. - SBT mint fails for a Safe or other smart-contract wallet. On-chain mode mints to externally owned accounts only.
- Flow cannot be deployed on-chain. Flows with a maximum age rule run in backend mode only.
Resources
Related
- Self Agent ID - Proof-of-human identity for AI agents
- Agent Vault - Card payments and website sign-in for agents
- ERC-8004 - Agent identity, reputation and validation registries
- Build with USA₮ - The Self-gated USA₮ faucet as a reference integration
- Fee abstraction - Let users pay gas in stablecoins