Integration
We offer a comprehensive range of services and technical support to ensure a seamless integration with our PoH service.
We offer a comprehensive range of services and technical support to ensure a seamless integration with our PoH service.
RESTful endpoint URL: https://face-dev.privasea.ai
We will provide API KEY
& API SECRET
for our partners
PRIVASEA-KEY
and PRIVASEA-SIGNATURE
parameters in headers, are required in all requests.
For the GET
endpoint, the additional parameter must be sent in the query string
For POST
and DELETE
endpoints, additional parameters must be sent in the request body
, and the content should be application/json
0 value of all number
type parameters will be ignored.
Responses of all RESTful endpoints are JSON data, which contains
All endpoints must be signed and authenticated with your API Key to verify that parameters or values have not been modified in transit.
key=value
(signature-related value must not be URL-encoded).&
(include timestamp
).PATH
with ?
to generate PATH_URL
.METHOD
and PATH_URL
.POST
and DELETE
after step 5. Skip this step if there is no entity-body.API Secret
and the above result to generate HMAC SHA256
code, then convert it to hexadecimal.PRIVASEA-SIGNATURE
,
add it to the Header
, and send the request.
User's API Secret is:
Secret:123456
The base part of the request to get verify code is:
GET /api/v1/verification/channel_code
Step 1, set query parameters as key-value pairs: key=value
channel=ABC
expire_at=30
operation_type=0
Step 2, Sort the key-value pairs in ascending ASCII order by key and concatenate with &
channel=ABC&channel_user_id=1&expire_at=30&operation_type=0
Step 3, concatenate the above result after PATH
with ? to generate PATH_URL
.
/api/v1/verification/channel_code?channel=ABC&channel_user_id=1&expire_at=30&operation_type=0
Step 4, concatenate METHOD
and PATH_URL
.
GET/api/v1/verification/channel_code?channel=ABC&channel_user_id=1&expire_at=30&operation_type=0
Step 5, Concatenate related entity body of POST
and DELETE
after step 4. Skip this step if there is no entity-body.
b'GET/api/v1/verification/channel_code?channel=ABC&channel_user_id=1&expire_at=30&operation_type=0
Step 6, Use API Secret
and the above result to generate HMAC SHA256
code, then convert it to hexadecimal.
For example:
GET /api/v1/verification/link_code
{
"code": 0,
"data": {
"id": 1,
"created_at": "2024-09-27T10:14:09.297+08:00",
"updated_at": "2024-09-27T10:14:09.297+08:00",
"deleted_at":
null
,
"channel": "ABC",
"channel_user_id": "1",
"code": "sSnvfP",
"operation_type": 0, // 0 indicates that the user does not link
"user_id": 0,
"expire_at": 1727517600
},
"msg": "ok",
"timestamp": 1727403250336
}
{
"code": 200403,
"error": "PRIVASEA-SIGNATURE is invalid",
"msg": "Unauthorized",
"timestamp": 1727425273894
}
GET /api/v1/verification/query_link
(1)Obtain the verification code through interface of Get VerifyCode, the operation_type is 0;
(2)Return to ImHuman APP, select link Channel, enter the verification code for link operation
(3)Query whether the user has completed the link by the verification code
{
"code": 0,
"data": {
"address": "0xbcb458Ce9fB43369b81c8B4D36917f9621108d4C",
"chain": "Arbitrum",
"poh": {
"face-nft": {
"id": 1004,
"created_at": "2024-09-20T02:25:12.012Z",
"updated_at": "2024-09-20T02:25:14.476Z",
"deleted_at":
null
,
"user_id": 581,
"name": "face token #1004",
"symbol": "PRT",
"rarity": "Super common",
"uri": "https://storage.googleapis.com/privasea-face/metadata/1004-metadata.json",
"image_uri": "https://storage.googleapis.com/privasea-face/avatar/1004-avatar.png",
"face_uri": "https://storage.googleapis.com/privasea-face/vector/1004-vector.json",
"Attributes": "{\"type\":\"Super common\",\"helix_alpha\":\"Indigo Dye\",\"helix_beta\":\"Pastel Blue\",\"zebra\":\"Tufts Blue\"}",
"chain": "Arbitrum"
}
}
"user_name": "cxltest07"
},
"msg": "ok",
"timestamp": 1727429806953
}
{
"code": 200403,
"error": "PRIVASEA-SIGNATURE is invalid",
"msg": "Unauthorized",
"timestamp": 1727425273894
}
Note:We do not recommend that you implement this feature in your app or website, as it may cause errors in our points system or lead to confusion in binding information. We provide this API for your reference in case of need.
GET /api/v1/verification/query_unlink
{
"code": 0,
"data": {
“message”:”unlink successful”,,
"unlink_status": true
},
"msg": "ok",
"timestamp": 1727427295325
}
Explanation: If verify_status is true, the verification code passes. You can perform the unlinking operation
{
"code": 200404,
"error": "verify code is not found",
"msg": "NotFound",
"timestamp": 1727426789961
}
GET /api/v1/verification/verify_code
{
"code": 0,
"data": {
"verify_code": "8gHRDs",
"expire_time": 1727427914
},
"msg": "ok",
"timestamp": 1727427295325
}
{
"code": 200404,
"error": "The UID has no Link",
"msg": "NotFound",
"timestamp": 1727426789961
}
GET /api/v1/verification/verify_status
{
"code": 0,
"data": {
"verify_status": 1 // 0 means no operation, 1 means verification successful, 2 means verification failed, and 3 means not yourself
},
"msg": "ok",
"timestamp": 1727427295325
}
{
"code": 200404,
"error": "Response timed out.",
"msg": "NotFound",
"timestamp": 1727426789961
}
If you would like to know more about the solution we are building or if you want to collaborate in any way, please feel free to reach out on email contact@privasea.tech or fill in the form here