Generate URL API
Call this API to generate an H5 Frontend link.
Request Example:
curl -X POST \
https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/generate-face-authentication-url \
-H 'Content-Type: application/json' \
-H 'X-ACCESS-TOKEN:{Your Access Token}' \
-d '{
"returnUrl": "https://www.example.com",
"failReturnUrl":"https://www.example.com/fail",
"callbackUrl": "https://www.example.com/callback",
"bizId": "7ac66c0f148de9519b8bd264312c4d64",
"userId":"8e44f0089b076e18a718eb9ca3d94674",
"region":"NGA",
"language": "en-US",
"prefersColorScheme":"light",
"ignoreFailWhenJump": false,
"bizCode":"WhiteCard"
}'
Request Url
https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/generate-face-authentication-url
POST (application/json)
https://api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/generate-face-authentication-url
POST (application/json)
Request Header Parameters
Parameter | Description |
---|---|
X-ACCESS-TOKEN | string Please use Token Authentication API to get your access token |
Request Parameters
Parameter | Description |
---|---|
returnUrl |
|
failReturnUrl |
|
callbackUrl |
|
userId |
|
region |
|
language | The languages currently supported by the frontend are: en - English Refer to HTTP Accept-Language NOTE: |
prefersColorScheme |
|
ignoreFailWhenJump |
|
bizId |
|
bizCode |
|
iframeEnabled | The iframeEnabled parameter is used to activate iframe integration mode. When this parameter is set to true, the generated URL will allow the workflow to be embedded into your web application via an iframe. This provides a seamless experience by eliminating the need for users to leave your application interface. |
prefersColorScheme
indicate the theme that AAI's Frontend should use.
Supported Values | explained |
---|---|
light | light theme. |
dark | dark theme. |
Response Description
Parameter | Description |
---|---|
code | Response Code of this Face Authentication Transaction. |
transactionId | The request id, the max length is 64 |
pricingStrategy |
|
message | Status Code Explanation |
data |
|
| |
| |
extra | Extra response info (Exception Message) |
Response Code
Status Code | Message |
---|---|
SUCCESS | OK |
PARAMETER_ERROR | Parameter error, please check you input. |
Parameter should not be empty | |
Invalid returnUrl, please check your returnUrl | |
Prefers color scheme is wrong | |
Region is wrong | |
ERROR | Server error |
Response Examples
SUCCESS
{
"code": "SUCCESS",
"message": "OK",
"data": {
"signatureId": "ed8b21c0c87ad617",
"url": "https://h5.advance.ai/idvs/?token=eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJoNV9saXZlbmVzcyIsInN1YiI6IntcImN1c3RvbWVySWRcIjozMTUwMjk4LFwiYWNjb3VudElkXCI6MzE1MDI5OSxcIl90aW1lc3RhbXBcIjoxNzA4NTA5ODk5OTI4LFwiX3V1aWRcIjpcIjFmYzEzOWExMTY1YjRjMTBiY2U4MDFkM2RkMjRhYzI4XCJ9IiwiYXVkIjoiV0VCIiwiaWF0IjoxNzA4NTA5ODk5LCJleHAiOjE3MDg1MTM0OTl9.VKpPl8fDtdhD2y6Y2VwUYOdlnJKusRrDtmfw4FY6lq2kbStk0J45VdchdEHl4oa9SZq9_b9hYBJ1KzCSegAglA&signatureId=ed8b21c0c87ad617",
"expiredTime":1642580192430
},
"extra": null,
"transactionId": "ed8b21c0c87ad617",
"pricingStrategy": "FREE"
}
REGION_WRONG
{
"code":"REGION_WRONG",
"message":"Region is wrong",
"data":null,
"extra":null,
"transactionId":"0f74aeb4dd3f1d48",
"pricingStrategy":"FREE"
}
PARAMETER_ERROR
{
"code":"PARAMETER_ERROR",
"message":"Parameter error,please check you input.",
"data":null,
"extra":null,
"transactionId":"ba134d6112c57a4c",
"pricingStrategy":"FREE"
}
{
"code":"PARAMETER_ERROR",
"message":"Parameter should not be empty",
"data":null,
"extra":null,
"transactionId":"dfcdc346a81f404f",
"pricingStrategy":"FREE"
}
{
"code":"PARAMETER_ERROR",
"message":"Invalid returnUrl,please check your returnUrl",
"data":null,
"extra":null,
"transactionId":"876cf2a354f73725",
"pricingStrategy":"FREE"
}
ERROR Response
{
"code":"ERROR",
"message":"Server error",
"data":null,
"extra":null,
"transactionId":"1deae5a13ef2bd5e",
"pricingStrategy":"FREE"
}
Updated 11 days ago