Building with Passport
Passport API v1
Overview

Passport API

The Passport API serves as a powerful tool for developers, offering access to Passport scores and Stamps using REST endpoints.

Why use the API

The API offers a simple integration; one that requires just two requests to submit and request user Passport XYZ data. This data is retrieved from the centralized Passport XYZ servers, meaning it is the most up-to-date data available for Passport XYZ users.

Example developer journey

An excellent use case for Passport is to gate access to special content. To make this happen, we'll need to:

  1. Creating a Passport Scorer and API key
  2. Submit the user’s address for scoring using the POST /registry/submit-passport endpoint. Find the user's score in the response.
  3. Depending on the type of scorer you set up, you will either compare the unique humanity score against a threshold that you set, or utilize the binary score.

At this point, you know whether the user was able to prove their humanity or not, and you can grant access to the protected program.

If you need to refresh the score, resubmit the address to POST /registry/submit-passport.

You can also retrieve the last refreshed score by making a request to the following endpoint: GET /registry/score/{scorer_id}/{address}

Available endpoints

Endpoint actionEndpoint
Retrieval of signing messagesGET /registry/signing-message
Submitting Passports for scoring or refreshPOST /registry/submit-passport
Retrieval of scores for one addressGET /registry/score/{scorer_id}/{address}
Retrieval of scores for multiple addressesGET /registry/score/{scorer_id}
Retrieval of Stamps linked to PassportsGET /registry/stamps/{address}
Retrieval of all available StampsGET /registry/stamp-metadata
Retreival of community staking amountsGET /registry/gtc-stake/{address}

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).

Next steps

Learn more about the Passport API: