-
Notifications
You must be signed in to change notification settings - Fork 12
adding hosted bundles docs #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: The Age Bundle | ||
| description: Over 100 countries supported | ||
| --- | ||
|
|
||
| Currently in Alpha : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. | ||
|
|
||
| # Coming soon (March 2026) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| title: The Default Bundle | ||
| description: You must pass the provider ID | ||
| --- | ||
|
|
||
| ## You need a providerId | ||
| If you set the `bundleId` to `default`, you need to also pass the `providerId`. | ||
|
|
||
| You can see all the providers [created by the Reclaim Protocol Community](https://dev.reclaimprotocol.org/explore). You can just copy the providerId from there. | ||
|
|
||
| If you do not find a provider of your choice, you can build one yourself using the [Provider Builder](https://dev.reclaimprotocol.org/provider-builder). | ||
|
|
||
| ## UI | ||
| The user will be navigated directly to the login page of the providerId. There is no provider selection page. | ||
|  | ||
|  | ||
|  | ||
|  | ||
|
|
||
| ## Callback | ||
| To the callback you set, you will receive a json like so : | ||
| ```json | ||
| { | ||
| "data": { | ||
| "sessionId": "YOUR SESSION ID", | ||
| "applicationId": "YOUR APPLICATION ID", | ||
| "bundleId": "default", | ||
| "proofs": [ | ||
| { | ||
| "success": true, | ||
| "data": { | ||
| "PARAM_1_NAME": "PARAM_1_VALUE", | ||
| "PARAM_2_NAME": "PARAM_2_VALUE", | ||
| }, | ||
| "metadata": { | ||
| "verified": true, | ||
| "timestamp": 1766854715373 | ||
| } | ||
| } | ||
| ], | ||
| "timestamp": "2025-12-27T16:58:35.373Z" | ||
| }, | ||
| "signature": "0x5515a680e6f05d844c1e54aa231b...RECLAIMPROTOCOL_SIGNATURE" | ||
| } | ||
| ``` | ||
|
|
||
| You can see all the parameter's [descriptions here](../usage). | ||
|
|
||
| However, unlike all other bundles, the parameters inside `proofs[i].data` will depend on the providerId you selected. You can see the provider's response schema on dev.reclaimprotocol.org. You must look for the `extractedParameterValues` of the provider schema. That is the object you will receive in `proofs[i].data`. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,52 @@ | ||||||||||||||||||
| --- | ||||||||||||||||||
| title: The Education Bundle | ||||||||||||||||||
| description: Over 20k universities world wide supported | ||||||||||||||||||
| --- | ||||||||||||||||||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor typo in description. "world wide" should be "worldwide" (one word). 🔎 Proposed fix ---
title: The Education Bundle
-description: Over 20k universities world wide supported
+description: Over 20k universities worldwide supported
---📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| Currently in Beta : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Provider ID is optional | ||||||||||||||||||
| - If you want to ask the user which university they study in, followed by verification of that university - leave the `providerId` blank. The user will be presented with a search functionality to search for their university. | ||||||||||||||||||
| - If you know that the student is from a particular university and you want to verify if the student is enrolled in that specific university, you can pass the provider ID. You can find the provider ID from the [Dev Tool](https://dev.reclaimprotocol.org/explore). | ||||||||||||||||||
|
|
||||||||||||||||||
| ## UI | ||||||||||||||||||
| If the provider ID is not set, the user will be asked to choose their university | ||||||||||||||||||
|  | ||||||||||||||||||
|  | ||||||||||||||||||
|  | ||||||||||||||||||
|  | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| ## Callback | ||||||||||||||||||
| To the callback you set, you will receive a json like so : | ||||||||||||||||||
| ```json | ||||||||||||||||||
| { | ||||||||||||||||||
| "data": { | ||||||||||||||||||
| "sessionId": "YOUR SESSION ID", | ||||||||||||||||||
| "applicationId": "YOUR APPLICATION ID", | ||||||||||||||||||
| "bundleId": "default", | ||||||||||||||||||
| "proofs": [ | ||||||||||||||||||
| { | ||||||||||||||||||
| "success": true, | ||||||||||||||||||
| "data": { | ||||||||||||||||||
| "fullName": "...", // Mandatory | ||||||||||||||||||
| "fieldOfStudy": "...", // Optional. What the student is studying | ||||||||||||||||||
| "dob": "...", // Optional. Date of birth | ||||||||||||||||||
| "gradYear": "...", // Optional. Expected date of graduation | ||||||||||||||||||
| }, | ||||||||||||||||||
| "metadata": { | ||||||||||||||||||
| "verified": true, | ||||||||||||||||||
| "timestamp": 1766854715373 | ||||||||||||||||||
| } | ||||||||||||||||||
| } | ||||||||||||||||||
| ], | ||||||||||||||||||
| "timestamp": "2025-12-27T16:58:35.373Z" | ||||||||||||||||||
| }, | ||||||||||||||||||
| "signature": "0x5515a680e6f05d844c1e54aa231b...RECLAIMPROTOCOL_SIGNATURE" | ||||||||||||||||||
| } | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
Comment on lines
+23
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect Two issues in this JSON example:
🔎 Proposed fix ```json
{
"data": {
"sessionId": "YOUR SESSION ID",
"applicationId": "YOUR APPLICATION ID",
- "bundleId": "default",
+ "bundleId": "education",
"proofs": [
{
"success": true,
"data": {
"fullName": "...", // Mandatory
"fieldOfStudy": "...", // Optional. What the student is studying
"dob": "...", // Optional. Date of birth
- "gradYear": "...", // Optional. Expected date of graduation
+ "gradYear": "..." // Optional. Expected date of graduation
},
"metadata": {
"verified": true,
- "timestamp": 1766854715373
+ "timestamp": 1766854715373
}
}
],Note: JSON doesn't support comments either ( 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| You can see all the parameter's [descriptions here](../usage). | ||||||||||||||||||
| The fields in the `data` section will always be the same for all universities. | ||||||||||||||||||
| If you are using this to verify student enrollment, even if you know the provider ID, we recommend using `bundleId=education` so that we can make sure all the universities responses are consistently formatted. Because, we do see some community providers to have slightly different schema or parameters making it messy to manage all edgecases. | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,8 @@ | ||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
| title: The Employment Bundle | ||||||||||||||||||||||||||||||||||
| description: Over 1500 employers world wide supported | ||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Currently in Alpha : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| # Coming soon (March 2026) | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor typo in description. "world wide" should be written as one word: "worldwide". 🔎 Proposed fix ---
title: The Employment Bundle
-description: Over 1500 employers world wide supported
+description: Over 1500 employers worldwide supported
---📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "title": "Bundle specific options", | ||
| "pages": [ | ||
| "default", | ||
| "education", | ||
| "employment", | ||
| "age" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||
| --- | ||||||||||
| title: Fully Hosted Solution | ||||||||||
| description: Easiest way to integrate Reclaim Protocol | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| The hosted solution is the easiest way to integrate Reclaim Protocol on a website. | ||||||||||
| We will manage all the plumbing for you, along with several custom UI. | ||||||||||
|
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar: pluralize "UI" to "UIs". The phrase "several custom UI" should be "several custom UIs" since "several" indicates multiple user interfaces. 🔎 Proposed fix The hosted solution is the easiest way to integrate Reclaim Protocol on a website.
-We will manage all the plumbing for you, along with several custom UI.
+We will manage all the plumbing for you, along with several custom UIs.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| # Are you in the right place? | ||||||||||
| Though for most websites, this is the easiest way to get started, this might not be the right fit if : | ||||||||||
| - If you are looking to integrate in an app, please jump to Android Kotlin, iOS Swift, React Native or Flutter sections. | ||||||||||
| - If you don't want us to manage the UI, you can jump to js-sdk | ||||||||||
| - If you are looking to do verifications without any user interactions, jump to zk-fetch | ||||||||||
|
|
||||||||||
| # Optimized UIs | ||||||||||
| The hosted solution has dedicated implementations for | ||||||||||
| - **Education verification** : Where the user must select their university before proceeding to verification. User will then be asked to login into their university portal in order to verify if they are a student there. We manage all the mapping for all university and respective university portals. | ||||||||||
| - **Employment verification** : Where the user must select their employer before proceeding to verification. Depending on the country the user is in, and the employer they select, they will be redirected to the appropriate website from which they can login. This includes HRIS portals, Tax Portals or Communication Apps like Slack and Teams. | ||||||||||
| - **Age verification** : Where user must select their country of residence. Depending on the country of residence, we will manage the right way for the user to verify their age. | ||||||||||
| - **All other verifications** : For all other verifications, you can pass a providerID, to tell us what to verify, and we will display the right UI to the user and manage the verification. | ||||||||||
|
|
||||||||||
| The UI is minimalistic and designed to get out of the way of the user, but still building trust that this is safe to verify using this process. | ||||||||||
|  | ||||||||||
|  | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||
| --- | ||||||
| title: Installation | ||||||
| description: No installation needed! | ||||||
| --- | ||||||
|
|
||||||
| ## Get an API Key | ||||||
| Setup your project using the [Get API Key guide](/api-key). | ||||||
|
|
||||||
| ## Pick your bundle | ||||||
| There are 4 supported bundles | ||||||
| - `education`, where the user has to select the university. You will receive the user's University Name and student information. [See details](./education). | ||||||
| - `employment`, where user has to select the country and employer. You will receive the user's Employer and other employee information. [See details](./employment). | ||||||
| - `age`, where user has to select the country. You will receive the country and user's age. [See details](./employment). | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect link for The 🔎 Proposed fix-- `age`, where user has to select the country. You will receive the country and user's age. [See details](./employment).
+- `age`, where user has to select the country. You will receive the country and user's age. [See details](./age).📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| - `default`, where you will have to set a providerID. [See details](./default). | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "title": "Fully Hosted Solution", | ||
| "pages": [ | ||
| "index", | ||
| "installation", | ||
| "usage", | ||
| "bundles" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,86 @@ | ||||||
| --- | ||||||
| title: Usage | ||||||
| description: Generate url and redirect user | ||||||
| --- | ||||||
| import { Tab, Tabs } from "fumadocs-ui/components/tabs"; | ||||||
|
|
||||||
| ## Generate a signed url | ||||||
| The first step is to generate a signed URL. This signed URL will be the destination where the user should be redirected to, to complete the verification. | ||||||
|
|
||||||
| Sample implementation [here](https://github.com/reclaimprotocol/hosted-bundles/blob/master/app/dummy-website/page.tsx). | ||||||
|
|
||||||
| <Tabs items={["cURL", "NodeJS"]}> | ||||||
| <Tab title="cURL"> | ||||||
| ``` | ||||||
| curl -X POST https://hosted-bundles.reclaimprotocol.org/api/helper/generate-signed-url \ | ||||||
| -H "Content-Type: application/json" \ | ||||||
| -d '{ | ||||||
| "applicationSecret": "YOUR_APPLICATION_SECRET", | ||||||
| "bundleId": "SELECTED_BUNDLE", | ||||||
| "callbackUrl": "YOUR_CALLBACK", | ||||||
| "sessionId": "YOUR_SESSIONID", | ||||||
| "providerId": "SELECTED_PROVIDERID" | ||||||
| }' | ||||||
| ``` | ||||||
| </Tab> | ||||||
| <Tab title="NodeJS"> | ||||||
| ``` | ||||||
| const response = await fetch('https://hosted-bundles.reclaimprotocol.org/api/helper/generate-signed-url', { | ||||||
| method: 'POST', | ||||||
| headers: { | ||||||
| 'Content-Type': 'application/json', | ||||||
| }, | ||||||
| body: JSON.stringify({ | ||||||
| applicationSecret: process.env.APPLICATION_SECRET, | ||||||
| bundleId: 'SELECTED_BUNDLE', | ||||||
| callbackUrl: 'YOUR_CALLBACK', | ||||||
| sessionId: 'YOUR_SESSIONID', | ||||||
| providerId: 'SELECTED_PROVIDERID' | ||||||
| }) | ||||||
| }); | ||||||
|
|
||||||
| const data = await response.json(); | ||||||
| const url = data.url; | ||||||
| ``` | ||||||
| </Tab> | ||||||
| </Tabs> | ||||||
|
|
||||||
|
|
||||||
| ### Understanding the parameters | ||||||
| - `applicationSecret` from [Get your API Keys](/api-key) | ||||||
| - `bundleId` - one of `education`, `employment`, `age`, `default`. See [installation](installation) for information to pick a bundleId. | ||||||
| - `callbackUrl` - a `POST` endpoint where the verified data will be sent. See next section for details. | ||||||
| - `sessionId` - a session identifier that you can use to identify the user on your system. We will send this session id back to you so you can map the verification to the said user. | ||||||
| - `providerId` - if you know a provider in specific that you want to use, you can set that here. You can see all the available providers on the [Developer Tool](https://dev.reclaimprotocol.org/explore). If you selected `default` for bundleId, you must set a providerId, else it is optional and user will be asked to select the provider using a managed UI. | ||||||
|
|
||||||
| ## Receiving the proof | ||||||
| You must expose a `POST` endpoint. That accepts a json object. | ||||||
| ```js | ||||||
| const body = await request.json(); | ||||||
| ``` | ||||||
|
|
||||||
| ### Verify | ||||||
| To make sure this is data that actually came from us, you can use a helper function. Just pass the body as is to the signature verification endpoint. | ||||||
|
|
||||||
| Sample implementation [here](https://github.com/reclaimprotocol/hosted-bundles/blob/master/app/api/dummy-callback/route.ts). | ||||||
|
|
||||||
| ```js | ||||||
| const verifyResponse = await fetch(`https://hosted-bundles.reclaimprotocol.org/api/helper/verify-callback`, { | ||||||
| method: 'POST', | ||||||
| headers: { | ||||||
| 'Content-Type': 'application/json', | ||||||
| }, | ||||||
| body: JSON.stringify(body), | ||||||
| }); | ||||||
|
|
||||||
| const verifyResult = await verifyResponse.json(); | ||||||
| const isVerified = verifyResult.verified; | ||||||
| ``` | ||||||
| Once it is verified, you can confidently use the data you received. Please see bundle specific guides for processing data from that bundle. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar: add hyphen to compound adjective. The phrase "bundle specific guides" should be "bundle-specific guides" as it's a compound adjective modifying "guides." 🔎 Proposed fix-Once it is verified, you can confidently use the data you received. Please see bundle specific guides for processing data from that bundle.
+Once it is verified, you can confidently use the data you received. Please see bundle-specific guides for processing data from that bundle.📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~79-~79: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI Agents |
||||||
| - [`default`](./bundles/default) | ||||||
| - [`education`](./bundles/education) | ||||||
| - [`employment`](./bundles/employment) | ||||||
| - [`age`](./bundles/age) | ||||||
|
|
||||||
| ### Troubleshooting | ||||||
| - Make sure CORS is enabled on this endpoint | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| "pages": [ | ||
| "index", | ||
| "api-key", | ||
| "fully-hosted", | ||
| "js-sdk", | ||
| "react-native", | ||
| "flutter", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid trailing comma in JSON example.
Line 34 has a trailing comma after the last property which is invalid JSON syntax.
🔎 Proposed fix
"data": { "PARAM_1_NAME": "PARAM_1_VALUE", - "PARAM_2_NAME": "PARAM_2_VALUE", + "PARAM_2_NAME": "PARAM_2_VALUE" },🤖 Prompt for AI Agents