| Protocol | Direction | URL |
| HTTPS POST | App server > Huawei fake user detection server | https://hirms.cloud.huawei.com/rms/v1/userRisks/verify?appId={appId} |
This API is used to obtain the fake user detection result.
You want to obtain the fake user detection result from the Huawei fake user detection server.
| URL Parameter | Type | Description |
| appId | String | Your app ID applied in AppGallery Connect. |
{“accessToken”:String,”response”:String}
| Parameter | Type | Mandatory (M)/Optional (O) | Description |
| accessToken | String | M | Access token. |
| response | String | M | Token obtained from the fake user detection result returned to the app. |
| Parameter | Type | Description |
| success | boolean | Fake user detection result. true: real user; false: fake user |
| challenge_ts | String | Response token generation time, which is in ISO format (yyyy-MM-dd’T’HH:mm:ssZZ). |
| apk_package_name | String | App package name. |
| error-codes | String | Error code returned when an API call exception occurs. |
| Error Code | Description | Solution |
| missing-input-at | The accessToken parameter is lost. | Add the accessToken parameter to the request body. |
| invalid-input-at | The accessToken parameter is invalid. | Ensure that the accessToken parameter is valid. |
| missing-input-response | The response parameter is lost. | Add the response parameter to the request body. |
| invalid-input-response | The response parameter is invalid. | Ensure that the response parameter is valid. |
| timeout-or-duplicate | The response parameter is invalid, has expired, or has been used. Note: The response token returned by the userDetection API is valid only in 2 minutes and can be used only once. | Call the userDetection API of the app to obtain another response token and use the token in 2 minutes. |