Authorization Using Submission Token
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"
}
*Please check here how to generate Hmac Token for autorization

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. Here, we give you an example using face liveness API.
Example Requesting Face Liveness API
Request Body
{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_YOUR_SELFIE}"
]
}

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:
https://api.cloud.nodeflux.io/v1/jobs/e0fd0da09411f2386acc343bb58e802d88c2bd6f6d22ea98GIYDEMJNGEYC2MBX
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
Expired Submission Token
{"code":"not-authenticate","errors":[],"message":"Submission token is expired","ok":false}
Submission Token has been used
{"code":"not-authenticate","errors":[],"message":"Submission token is already used","ok":false}
Export as PDF
Copy link
On this page
Implementation
Generate Submission Token
Request Analytics
Get job result
Error Response