This topic describes the common request parameters and common response parameters used when you call Risk Identification APIs.
Common request parameters
Risk Identification API requests include both common request parameters, which are required for all API operations, and service-specific event parameters. The following table describes the common request parameters.
Parameter | Type | Required | Description |
Format |
String |
Yes |
The format of the response. Valid values:
|
Version | String | Yes | The API version. The value must be in the YYYY-MM-DD format. The current version is 2019-05-21. |
AccessKeyId | String | Yes | The access key ID that Alibaba Cloud provides for you to access the service. |
Signature | String | Yes | The signature string. For more information about calculating the signature, see Section 2.0 in Call with an SDK. |
SignatureMethod | String | Yes | The signature method. Only HMAC-SHA1 is supported. |
Timestamp | String | Yes | The request timestamp, which must be in ISO 8601 format and UTC. The format is |
SignatureVersion | String | Yes | The version of the signature algorithm. Set the value to |
SignatureNonce | String | Yes | A unique random number to prevent replay attacks. You must use a different value for each request. |
Action | String | Yes | The value must be |
|
Service |
String |
Yes |
The service code provided by Alibaba Cloud Security. Do not customize this value. The following list describes the service codes:
|
|
ServiceParameters |
String |
Yes |
The service-specific event parameters in JSON format. Example: |
The following example shows a request for the Enhanced Registration Risk Identification service:
https://saf.cn-shanghai.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=account_abuse_pro
&ServiceParameters={"accountId":1012**** ...other event-specific parameters. See service documentation for details.}
Common response parameters
Every API request returns a unique identifier, RequestId, regardless of whether the call is successful. Other response parameters, such as score, tags, and extend, vary by service. For more information, see the documentation for the specific service.
The following example shows a JSON response for the Enhanced Registration Risk Identification service:
{
//service: account_abuse_pro
"Data": {
"score": 85.92, // Risk score. The value is a double that ranges from 0 to 100.
"tags": "rm0101" // Risk tag. The value is a string.
},
"Message": "OK",
"Code": 200, // A value of 200 indicates that the request was successful.
"RequestId": "4EF9AEE5-288F-4176-8110-00EDC91A614E"
} The sample responses in this topic are formatted for readability. The actual responses do not include line breaks or indentation.
The following example shows a JSON response for the Email Risk service:
{
"Data": {
"tags": "temp_email,gibberish_email" // String format.
},
"Message": "OK",
"Code": 200, // A value of 200 indicates that the request was successful.
"RequestId": "4EF9AEE5-288F-4176-8110-00EDC91A614E"
} Error codes
Code | Description |
200 | The request was successful. |
400 | The |
402 | The number of queries per second (QPS) exceeds the configured limit, triggering throttling. |
403 | Permission denied. The service may not be activated or could have expired. |
404 | The |
500 | An internal server error occurred. |