API Error Codes
This section describes all error codes returned when calling APIs fails. You are advised to press Ctrl+F to search for error codes on the page and find the required handling suggestions.
Solution for 404 Error
If a 404 message is returned when an API is called, check whether the application access address and URI (for details, see Development Preparation) are correct and whether they are combined into a complete request URL, for example, https://smsapi.ap-southeast-1.myhuaweicloud.com:443/sms/batchSendSms/v1.
Error Codes and Handling Suggestions
API calling error codes are generated when the SMS Sending API or Batch SMS Sending API is called. An example response is as follows:
Note: One response contains only one error code, and one mobile number corresponds to one status.
HTTP/1.1 200 OK Date: Mon, 06 Aug 2018 11:59:50 GMT Server: WebServer Content-Type: application/json;charset=UTF-8 Content-Length: 224 { "code":"000000", "description":"Success", "result": [{ "originTo":"+8618612345678", "createTime":"2018-08-06T11:59:50Z", "from":"1069031221280000001", "smsMsgId":"4b4b34e7-1a9e-42ac-b309-d10997148905_85496076", "status":"000000" }] }
Value |
Description |
Handling Suggestion |
---|---|---|
000000 |
The request is sent successfully. |
API calling was successful. Wait for the SMS status report. |
E000000 |
The system is abnormal. Typically, this means SMS platform cannot parse the request format because the format is incorrect. |
|
E000001 |
Authorization is not contained in the HTTP header. |
|
E000002 |
realm is not contained in Authorization. |
Check whether the Authorization field contains the realm attribute. |
E000003 |
profile is not contained in Authorization. |
Check whether the Authorization field contains the profile attribute. |
E000004 |
The value of realm in Authorization must be SDP. |
Check whether the value of realm in the Authorization field is SDP. |
E000005 |
The value of profile in Authorization must be UsernameToken. |
Check whether the value of profile in the Authorization field is UsernameToken. |
E000006 |
The value of type in Authorization must be Appkey. |
Check whether the value of type in the Authorization field is Appkey. |
E000007 |
type is not contained in Authorization. |
Check whether the Authorization field contains the type attribute. |
E000008 |
WSSE is not contained in Authorization. |
Check whether the Authorization field contains WSSE. |
E000020 |
X-WSSE is not contained in the HTTP header. |
Check whether the HTTP message header contains the X-WSSE field. |
E000021 |
UserName is not contained in X-WSSE. |
Check whether the X-WSSE field contains the UserName attribute. |
E000022 |
Nonce is not contained in X-WSSE. |
Check whether the X-WSSE field contains the Nonce attribute. |
E000023 |
Created is not contained in X-WSSE. |
Check whether the X-WSSE field contains the Created attribute. |
E000024 |
PasswordDigest is not contained in X-WSSE. |
Check whether the X-WSSE field contains the PasswordDigest attribute. |
E000025 |
The format of Created is incorrect. |
Check whether the format of the Created attribute in the X-WSSE field is correct. |
E000026 |
UsernameToken is not contained in X-WSSE. |
Check whether the X-WSSE field contains the UsernameToken attribute. |
E000027 |
Invalid request. |
Check whether the parameters in the request are valid based on the parameter description and requirements in the API reference. |
E000040 |
The value of ContentType must be application/x-www-form-urlencoded. |
Check whether the value of the ContentType header field is application/x-www-form-urlencoded. To send SMSs, set ContentType to application/x-www-form-urlencoded. To send SMSs in batches, set ContentType to application/json. |
E000041 |
X-Sdk-Date is empty. |
For special AK/SK authentication, check the value of X-Sdk-Date in the HTTP message header. |
E000042 |
Incorrect X-Sdk-Date format. |
For special AK/SK authentication, check the format of X-Sdk-Date in the HTTP message header. The format is yyyyMMdd'T'HHmmss'Z'. |
E000043 |
Incorrect Authorization format. |
For special AK/SK authentication, check the format of Authorization in the HTTP message header. |
E000044 |
X-Sdk-Date expires. |
For special AK/SK authentication, check the time of X-Sdk-Date in the HTTP header. The difference between the time and the local time when the request is sent cannot exceed 15 minutes. Otherwise, the authentication fails. |
E000045 |
Authorization verification failed. |
For special AK/SK authentication, check the Signature field in Authorization of the HTTP message header. |
E000101 |
Authentication failed. |
Check whether the values of Authorization and X-WSSE are correct. |
E000102 |
app_key is invalid. |
Check whether app_key in the request is correct. If app_key is correct, check whether the application access address (obtained from the Application Management page on the console) is correct. |
E000103 |
app_key is unavailable. |
Contact the administrator to check whether the app_key status is normal. |
E000104 |
app_secret is invalid. |
Check whether app_secret in the request is correct. |
E000105 |
PasswordDigest is invalid. |
Check whether PasswordDigest in the request is correct. |
E000106 |
The app_key does not have the permission to call this API. |
Contact the administrator to check whether the application corresponding to the app_key supports SMS capability exposure. |
E000109 |
The user is deactivated. |
Contact the administrator to activate the user. |
E000110 |
The time exceeds the limit. |
When X-WSSE authentication is used, make sure that there is not too much difference between the time when the random string is generated and the local time when the request is sent. For details, contact the administrator. Check whether the local time of the server is correct. It is recommended that the difference between the local time of the server and the Beijing time be less than or equal to 8 hours. Check the code for the Created parameter that indicates the random number generation time. Take Java as example. Change YYYY in the format string to yyyy. For details, see SMS Sending API. |
E000111 |
Incorrect username or password. |
The user information corresponding to app_key cannot be found. Contact the administrator. |
E000112 |
The user is frozen. |
If the account is frozen due to arrears, top up the account by referring to Topping Up an Account (Prepaid Direct Customers). Then, the account is automatically unfrozen. If the account is frozen due to violation, modify the service and contact the operations manager to apply for account unfreezing. |
E000503 |
The parameter format is incorrect. |
Check the parameter format. Types of format errors are listed as follows. Handle the problem based on the returned error message.
|
E000510 |
The SMS fails to be sent. For details about the failure cause, see the status parameter. |
Rectify the fault based on Table 2. |
E000620 |
The peer application IP address is not in the whitelist. |
|
E000623 |
Number of SMSs sent reached the limit. |
Adjust limit values of the total number of SMSs sent by referring to Settings. The default limit value of the total number of SMSs sent per day is 500. The default limit value of the total number of SMSs sent per month is 10,000. You can submit a service ticket to increase the limit values. |
E000630 |
Number of SMSs sent reached the country/region limit. |
Adjust country/region limit values of SMS sending by referring to Settings. |
Value |
Description |
Handling Suggestion |
---|---|---|
E200015 |
The number of SMSs to be sent exceeds the upper limit. |
The SMS platform is performing flow control. Wait for about 10 minutes and try again. |
E200028 |
The template variable verification failed. |
Check the value of templateParas in the request. Check whether the number of variables in the template is correct and whether the length of the variables is less than the specified length of the template specified by templateId. If the template specified by templateId is a non-variable template, the request does not carry templateParas. If templateParas is included, leave it blank. For example: Your verification code is ${NUM_6}. Finish the verification as soon as possible. Have a nice day! Note: The template contains a variable of the numeric type. The variable contains a maximum of six digits. The following are examples of correct values: templateParas='["12345"]'; //API for sending SMS messages templateParas=["345678"]; //API for sending SMS messages in batches The following are examples of incorrect values: templateParas='["123","456"]'; //API for sending SMS messages. The number of variables is incorrect. templateParas='["1234567"]'; //API for sending SMS messages. The variable length is incorrect. templateParas='["1a2b3c"]'; //API for sending SMS messages. The variable content type is incorrect. |
E200029 |
The template type verification failed. |
Check the values of templateId and from in the request and verify that the template ID, signature sender number, and type are correct.
|
E200030 |
The template is not activated. |
Check whether the value of templateId in the request is correct. |
E200031 |
The protocol verification failed. |
Check whether the values of Application Key and Application Secret are correct. |
E200033 |
The template type is incorrect. |
Rectify the fault by referring to the recommendation for E200029. Wait for about 10 minutes and send the request again. |
E200041 |
The recipient numbers of the same SMS are duplicate. |
The SMS platform automatically deletes duplicate numbers and sends only one SMS to the number. |
E200048 |
The sending frequency limit is reached. |
You can change the sending frequency limit on the Settings page of the console. Alternatively, you can send SMSs after the frequency control time expires. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot