Version
5.0.0
Describe
This interface is used to generate a verification request identifier. The application party transmits the configuration related to this live body to the FaceID server through the server. After verification, the biz_token of this business is returned, which is used to initialize the FaceID MegLiveStill SDK.
Call URL
Singapore :https://api-sgp.megvii.com/faceid/v5/sdk/get_biz_token
Indonesia region :https://api-idn.megvii.com/faceid/v5/sdk/get_biz_token
Note : In a production environment, please use HTTPS communication method. HTTP communication is an unsafe link and involves security risks. Please do not use it in a production environment. If you use HTTP in a production environment, service reliability cannot be guaranteed.
call method
POST Note: Use form-data format to request
Permissions
Only when the user accesses the FaceID product can the FaceID Web APIs be called. Please consult FaceID business personnel for the process of accessing FaceID.
parameter
Required/optional | parameter | type | Parameter Description |
---|---|---|---|
required | sign | String | [Authentication Guide] document for the specific signature generation method. |
required | sign_version | String | Signature algorithm version, please pass: hmac_sha1 |
required | liveness_id | String | Living scene ID: The relevant configuration of this living body request can be set in the console, and the generated ID number will be used in the interface. |
Return value description
Field | type | illustrate |
---|---|---|
request_id | String | A unique string used to distinguish each request. This string can be used for subsequent data retrieval. This field must return |
time_used | Int | The time spent on the entire request, in milliseconds, this field must be returned |
biz_token | String | String, information passed in when calling SDK, biz_token validity period defaults to 1 hour |
error | String | This string will be returned only when the request fails. For the specific return content, see the subsequent error information section. Otherwise this field does not exist |
Return value example
Correct request return example
{
"biz_token":"1531397038,f0b9eea0-6a2d-486c-a1ba-42fdf843e8cc",
"time_used":18,
"request_id":"1531397037,c1223c5b-c2f6-4bb7-8cbb-8993497ddbe0"
}
Failed request return example
{
"error": "BAD_ARGUMENTS: sign_version"
}
Error code list
HTTP status code | error message | illustrate |
---|---|---|
400 | MISSING_ARGUMENTS: <key> | A required parameter is missing |
400 | BAD_ARGUMENTS: <key> | There is an error in parsing a certain parameter (for example, it must be a number, but the input is a non-numeric string, or the length is too long) |
403 | AUTHENTICATION_ERROR | Invalid signature |
403 | AUTHORIZATION_ERROR: <reason> | api_key is disabled, the number of calls has exceeded the limit, there is no permission to call this API, or there is no permission to call this API in the current way. |
403 | CONCURRENCY_LIMIT_EXCEEDED | The number of concurrency exceeds the limit |
404 | API_NOT_FOUND | The API being called does not exist |
500 | INTERNAL_ERROR | Internal server error. When such an error occurs, please request again. If such errors continue to occur, please contact FaceID customer service or business in time. |