Passport API v2
The Passport API serves as a powerful tool for developers, offering access to Passport's Stamp-based score metadata using REST endpoints.
Why use the API
The API offers a simple integration; one that requires just two requests to submit and request user Human Passport data. This data is retrieved from the centralized Human Passport servers, meaning it is the most up-to-date data available for Human Passport users.
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
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).
Next steps
- Set up an API key and Scorer/Project
- Make your first API request
- Review the API Reference to get to know the available endpoints
- Get support via our Telegram channel (opens in a new tab)