Stamps API v2
Passport Stamps is an aggregate, real-time verification tool that can enable users to prove their unique humanity using a variety of different verification methods, and for developers to access these humanity proofs via the Stamps API or smart contracts.
Users can prove their humanity using Passport Stamps by visiting the Passport App (opens in a new tab) and completing a verification flow, or by using the Passport Embed widget on a partner website or dApp.
Why use the API
The Stamps API offers a simple integration; one that requires just one request to receive users' Stamp-based Unique Humanity Score and associated metadata. This data is retrieved from the centralized Human Passport servers, meaning it is the most up-to-date data available for Human Passport users.
All Passport Stamps user data can be accessed via the Stamps API, whereas only a portion of users' have minted their Passport onchain, making it available via our smart contracts.
Example flow
An excellent use case for Human Passport is to protect access to a reward or governance program. To make this happen, follow these steps:
- Creating a Passport Project/Scorer and API key
- Retrieve a user's Passport score and Stamp data using the GET /v2/stamps/{scorer_id}/score/{address} endpoint.
- Find the user's Unique Humanity Score or
passing_score
within the returned data. - Compare the Unique Humanity Score against a threshold that you set, or utilize the binary
passing_score
field that uses our recommended threshold of 20.
If a user was able to build up a score greater than this threshold, they've effectively proven their humanity and you can grant access to the protected program.
Available endpoints
Stamps API v2 base URL: https://api.passport.xyz (opens in a new tab)
Endpoint action | Endpoint |
---|---|
Retrieve latest score for a single address | GET /v2/stamps/{scorer_id}/score/{address} |
Retrieve historical score for a single address | GET /v2/stamps/{scorer_id}/score/{address}/history |
Retrieve Stamps verified by a single address | GET /v2/stamps/{address} |
Retrieve all Stamps available in Passport | GET /registry/stamp-metadata |
Learn more about each of these endpoints on our API Reference page, or experiment with them using our API playground (opens in a new tab) (requires API key and Scorer/Project).