Quickstart
Using Self Enterprise? This is the wrong quickstart. This page is for the open-source Self Pass SDK (@selfxyz/qrcode + @selfxyz/core), where you render the QR code yourself. On the managed Self Enterprise platform you do NOT install @selfxyz/qrcode and you do NOT render your own QR: your backend calls one SDK and you redirect the user to a hosted verificationUrl that Self serves. Go to the Self Enterprise quickstart.
⚠️ Forking the boilerplate repo is a great starting point for your project to integrate Self. It contains a basic working example that demonstrates how to integrate Self. From this, you can add your own logic/requirements as needed.
Before You Start
New to Self Protocol? We highly recommend watching our ETHGlobal Buenos Aires Workshop first. This essential workshop walks through the core concepts and provides a hands-on introduction to building with Self.
Examples
Working examples of Self Protocol integration are available to use as a foundation to build upon.
Choose Your Verification Path
Every Self Pass integration has two parts: a frontend that displays a QR code (or deeplink) for users to scan with the Self app, and a verification method that checks the proof. You must choose one verification method:
How it works
Proof is verified on-chain by the IdentityVerificationHub
Proof is verified on your Node.js server using SelfBackendVerifier
Trust model
Trustless — anyone can verify the result on-chain
Trust assumption — users trust your backend verifies correctly
Best for
DeFi, airdrops, token gates, on-chain access control
Web apps, APIs, off-chain services, rapid iteration
Trade-offs
Gas costs per verification; config changes require redeployment
No gas costs; easier to update; requires a running server
Both paths use the same frontend SDK (@selfxyz/qrcode) to display the QR code. The only difference is where verification happens.
Choose Your Environment
Environment
Documents
Network
endpointType
When to use
Staging
Mock passports
Celo Sepolia
staging_celo (contract) or staging_https (backend)
Development and testing
Production
Real passports
Celo Mainnet
celo (contract) or https (backend)
Live applications
Mock passports only work with staging endpoints on Celo Sepolia. Real passports only work with production endpoints on Celo Mainnet. See Using Mock Passports for setup instructions.
Key Concepts
scopeSeed— A short string (max 31 ASCII characters) that uniquely identifies your application, e.g."my-airdrop-app". You pass this into your smart contract constructor asscopeSeed, and it gets hashed together with the contract address (using Poseidon) to produce the finalscope— a uint256 value used in proofs to ensure nullifiers are unique to your app and prevent proof replay. Note: the frontendSelfAppBuildercurrently names this fieldscope, but you are passing in thescopeSeedvalue.endpointType— Determines where the proof is sent and which network is used (see table above).endpoint— The destination address. For contract verification, this is your deployed contract address. For backend verification, this is your API URL.
Overview

Installation
Install the required frontend packages:
Package purposes:
@selfxyz/qrcode: QR code generation and display components@selfxyz/core: Core utilities includinggetUniversalLinkfor deeplinksethers: Ethereum utilities for address handling
Basic Usage
Here's a complete Next.js component example based on the workshop:
If you instead want to use the Self App on a mobile then we check out the Use Deeplinking and Usage (Mobile) sections!
Verification Flow
The QR code component displays the current verification status with an LED indicator and changes its appearance based on the verification state:
QR Code Display: Component shows QR code for users to scan
User Scans: User scans with Self app and provides proof
Verification:
Onchain Verification: Your smart contract receives the proof and verifies it on the Self VerificationHub contract.
Backend Verification: Your API endpoint receives and verifies the proof
Success Callback:
onSuccesscallback is triggered when verification completes
Add SelfBackendVerifier to your backend
SelfBackendVerifier to your backendIf you want to verify your proofs with the backend verifier, then you would implement the following.
Requirements
Node v16+
Install dependencies
Set Up SelfBackendVerifier
The endpoint must be publicly accessible (not localhost). For local development, use ngrok to tunnel your localhost endpoint.
Key Points
Configuration Matching
Your frontend and backend configurations must match exactly:
Next Steps
Disclosures — Full reference for all verification rules and disclosure fields
Deployed Contracts — Hub addresses for Celo Mainnet and Sepolia
Using Mock Passports — Test your integration without a real passport
Troubleshooting — Common errors and solutions
Last updated