# Get Token
# Version
5.0.0
# Description
This interface is used to generate a verification request identifier. The application party transmits the configuration related to this live body to the FinAuth server through the server. After verification, the biz_token of this business is returned, which is used to initialize the FinAuth FaceLiveStill SDK.
# Request URL
Singapore: POST https://api-sgp.yljz.com/finauth/v5/sdk/get_biz_token
Indonesia: POST https://api-idn.yljz.com/finauth/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.
# Permission
Only when the user accesses the FinAuth product can the FinAuth Web APIs be called. Please consult FinAuth business personnel for the process of accessing FinAuth.
# Parameters
| 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. |
| Optional | uuid | String | Used to uniquely identify the user for this recognition. The length should not exceed 128 bytes. It is recommended to use the same ID consistently for the same user to facilitate result tracing and data reporting optimization. Note: Due to historical design reasons, the uuid field currently exists in both the get_biz_token and verify API request parameters. |
# Return Values
| 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 |
# Sample Response
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 Message
| Status Code | Error Message | Description |
|---|---|---|
| 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 FinAuth customer service or business in time. |
