This recipe shows how to verify a user’s credential inside your application using the AIR Kit SDK. After verification, you can gate access to features, content, or services based on the result.Documentation Index
Fetch the complete documentation index at: https://docs.moca.network/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll build
- A verification program configured for your app.
- SDK code that prompts the user to present a credential.
- Application logic that reacts to the verification result.
Prerequisites
- AIR Kit SDK installed and initialized. See Installation and Initialization.
- A Verifier DID from the Developer Dashboard.
- At least one credential issued to a test user (see Issue Credentials Quickstart).
Step 1: Create a verification program
- Go to the Developer Dashboard.
- Navigate to Verifier > Programs.
- Create a new verification program, selecting the credential schema you want to verify against.
- Note the Verification Program ID.
Step 2: Authenticate the user
The user must have an active session before verification. Use the AIR Kit login flow:Step 3: Request credential verification
CallverifyCredentials with your Verifier DID and the verification program ID:
- Web
- Flutter
Step 4: Gate features based on the result
Auth token for server-side verification
If you need to verify from your backend instead, generate a Partner JWT withscope: "verify":
Next steps
- Credential Verification reference for the full API
- Schema Design to understand what fields are verifiable
- Quickstart: Credential Verification for a step-by-step walkthrough