Quickstart

This guide will get you all set up and ready to use the Proof of Personhood. We'll cover how to get started using our REST API and how to integrate the PoP Web SDK to your web platform. We'll also look at where to go next to find all the information you need to take full advantage of our powerful REST API.

1. Create a new app

Before making your first API request, you need to pick which API client you will use. In addition to good ol' cURL HTTP requests, Protocol offers clients for JavaScript, Python, and PHP. In the following example, you can see how to install each client.

2. Init a new Session

After picking your preferred client, you are ready to make your first call to the Protocol API. Below, you can see how to send a GET request to the Conversations endpoint to get a list of all your conversations. In the cURL example, results are limited to ten conversations, the default page length for each client.

GET
/v1/personhood/init
curl --location --request POST 'https://api.pop.anima.io/v1/personhood/init' \
--header 'Api-Key: {YOUR_API_KEY}'

3. Embed PoP SDK

When you have a valid initialized session using your Personhood app credentials, you must then initilaize the PoP SDK to let your users complete a fast liveness challenge to prove their humanhood

Install PoP SDK

SDK
Personhood SDK
npm install @anima-protocol/personhood-sdk-react

Embed PoP SDK

SDK
Personhood SDK
<Personhood
  onFinish={(state) => {
    // Execute this code when user finishes the onboarding
  }}
  sessionId="a62b8cf3-50eb-4991-8957-52d29b26ec2a"
  signCallback={(payload: string) => yourSigningFunc({message: payload)})}
  walletAddress={'0xb2935c933591e4f9B2C33448cB941CD4826Cfdf0'}
/>

4. Get session's overview

Once you have initialized a Personhood session and embeded the PoP SDK to your web app. You will be able to follow the current state of a given session simply by calling the Personhood API with the Overview endpoint.

It gives you everything you need to know to take action for a user.

What's next?

Great, you're now set up with the Personhood API and you have successfully initalized the PoP SDK. Here are a few links that might be handy as you venture further into the Personhood API: