Submission Token Authorization Method

A submission token is a one-time authorization token to request Nodeflux service analytics. The submission token must be included in the header of all requests made to the API request. The token will expire in 5 minutes.

Implementation

Generate Submission Token

To generate the submission token, Send a request using a POST method to the endpoint:
Request Header
Parameter
Value
Authorization
Using HMAC Token*
x-nodeflux-timestamp
X-nodeflux-timestamp value from signature request
Request Body: null
Response Example:
{
"ok": true,
"submission_token": "9268e8f3-1c2e-4b39-8604-61fe30a29908-GXYDEMJNGA4S2MRS"
}

Request Analytics

When requesting analytics API, the authorization token must be included in the header. Send POST method on Asynchronous API endpoint
Request Header
Parameter
Value
Authorization
Your Submission Token
For The request body, please follow each analytics API. Her, we give you an example using face liveness API.
Example Requesting Face Liveness API Endpoint:
Request Body
{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_YOUR_SELFIE}"
]
}
Response
{
"job_id": "e0fd0da09411f2386acc343bb58e802d88c2bd6f6d22ea98GIYDEMJNGEYC2MBX",
"ok": true
}

Get job result

Send GET request to get the analytics result, using endpoint:
Request Header:
Parameter
Value
Authorization
Your Submission Token
Example Requesting Result of Face Liveness API Endpoint:
Body Request: null
Response Example:
{
"job": {
"id": "e0fd0da09411f2386acc343bb58e802d88c2bd6f6d22ea98GIYDEMJNGEYC2MBX",
"result": {
"status": "success",
"analytic_type": "FACE_LIVENESS",
"result": [
{
"face_liveness": {
"live": false,
"liveness": 0.9294614851474762
}
}
]
}
},
"message": "Face Liveness Underqualified",
"ok": true
}

Error Response

Description
Error Response
Code
Expired Submission Token
{"code":"not-authenticate","errors":[],"message":"Submission token is expired","ok":false}
401
Submission Token has been used
{"code":"not-authenticate","errors":[],"message":"Submission token is already used","ok":false}
401

Postman Collection