This topic describes the common request parameters and common response parameters for Risk Identification API calls.
Common request parameters
Requests to the Risk Identification API include common request parameters and service-specific event parameters. Every API call must include the common request parameters described in the following table.
Parameter | Type | Required | Description |
Format | String | Yes | The format of the response. Valid values:
|
Version | String | Yes | The API version. Use the YYYY-MM-DD format. The current version is |
AccessKeyId | String | Yes | The AccessKey ID provided by Alibaba Cloud for service access. |
Signature | String | Yes | The signature string. For information about how to calculate a signature, see Section 2.0 in Call an API operation by using an SDK. |
SignatureMethod | String | Yes | The signing method. Only HMAC-SHA1 is supported. |
Timestamp | String | Yes | The timestamp of the request, which must be in UTC and formatted in accordance with the ISO 8601 standard as |
SignatureVersion | String | Yes | The version of the signature algorithm. Set the value to |
SignatureNonce | String | Yes | A unique random number used to prevent replay attacks. This number must be unique for each request. |
Action | String | Yes | The value must be |
Service | String | Yes | The predefined service code issued by Alibaba Cloud Security for the service you are calling. The following list provides the valid service codes:
|
ServiceParameters | String | Yes | The JSON format of the service parameter list is |
The following example shows the request parameters for the Device Risk Identification Pro Service:
https://saf.{region}.aliyuncs.com/
?Format=JSON
&Version=2019-05-21
&Signature=vpEEL0zFHfxXYzSFV0n7%2FZiFL9o%3D
&SignatureMethod=Hmac-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&Action=ExecuteRequest
&AccessKeyId=123****saf
&Timestamp=2018-06-01T12:00:00Z
&Service=device_risk_pro
&ServiceParameters={"deviceToken":1012****}Common response parameters
Every API response includes a unique RequestId, regardless of whether the call was successful. Responses may also include other parameters like score (risk score), tags (reason code), and extend (custom response parameters). The returned parameters vary based on the service. For more information, see the documentation for the specific service.
The following is a JSON example of the return parameters from the Device Risk Identification Pro Service:
{
// service: device_risk_pro
"RequestId": "52E3208D-E7BF-32F0-9913-2A168894D2D9",
"Message": "OK",
"Data": {
"extend": "0f533f6056f50664b48f2b3866220f0f", // Unique device ID
"tags": "is_rooted" // Reason code
},
"Code": 200 // The request is successful.
} The sample responses in this topic are formatted for readability. The actual responses are not indented or line-wrapped.
Error codes
Code | Description |
200 | The request is successful. |
400 | The |
402 | The query-per-second (QPS) rate exceeds the limit of your service plan, and the request was throttled. |
403 | Insufficient permissions. The service is not activated or has expired. |
404 | The |
500 | An internal server error occurred. |