Updated on 2023-11-15 GMT+08:00

Beginner

Service Process

The following figure shows the general custom-made software development process for the SMS service.

  1. Perform steps described in Development Preparation to obtain the data required for calling the SMS API.
  2. Follow instructs in the Code Examples to call the SMS API and initiate an SMS request.
  3. View the received response and check whether the request succeeds.
    • Yes: Go to 4.
    • No: Follow instructions in API Error Codes to rectify the fault and repeat 2.
  4. Check whether the request contains the statusCallback parameter. The statusCallback parameter specifies the callback address to which the status report is sent.
    • Yes: Check the received status report.
    • No: Log in to the Message & SMS console choose Send Details. On the displayed page, view the sending results and status codes.

    The Send Details function will be online soon.

  5. Check whether the SMS message is successfully sent based on the status report.
    • Yes: No further operation is required.
    • No: Follow instructions in SMS Status Error Codes to rectify the fault and repeat 2.

Commissioning Guide

During the custom-made software development process for the SMS service, developers need to pay attention to the following service commissioning points:

  • Check 1: Before initiating an SMS sending request, the system checks the validity of parameters in the request. For example:
    • The value of the Content-Type parameter in the request headers is application/x-www-form-urlencoded in the SMS sending API and application/json in the batch SMS sending API.
    • The value of the to parameter in the request body is a character string in the SMS sending API and a character string array in the batch SMS sending API.
    • If SMS status reports need to be received, the statusCallback parameter must be specified and the address is valid and reachable.
    • If the template type specified by templateId is a common template, you must set signature to the signature added before the SMS content in the common template.
  • Check 2: When obtaining the request result, parse the response result code and rectify the fault based on the handling suggestions in API Error Codes.
    HTTP/1.1 200 OK
    Date: Fri, 13 Apr 2018 06:29:08 GMT
    Server: WebServer
    Content-Type: application/json;charset=UTF-8
    Content-Length: 220
    
    {"result":[{"originTo":"+8615512345678","createTime":"2018-05-25T16:34:34Z","from":"1069031221280012","smsMsgId":"d6e3cdd0-522b-4692-8304-a07553cdf591_8539659","status":"000000"}],"code":"000000","description":"Success"}

    If code is set to E000510, the value of status needs to be parsed for fault locating and analysis.

  • Check 3: When the SMS content sent triggers the interception by the Huawei Cloud internal platform, the Huawei Cloud Message & SMS service pushes a status report to the customer. Parse the status code and rectify the fault based on the handling suggestions for the status codes provided by the Huawei Cloud internal platform in SMS Status Error Codes.

    Note: Huawei Cloud Message & SMS pushes the status report notification only when the callback address is specified for statusCallback in the SMS sending request. Otherwise, log in to the SMS console and go to the sending details page to view the status code.

  • Check 4: When receiving the SMS status notification from the SMSC, the Huawei Cloud Message & SMS service pushes a status report to the customer. Parse the status code and rectify the fault based on the handling suggestions in SMS Status Error Codes.

    Note: Huawei Cloud Message & SMS pushes the status report notification only when the callback address is specified for statusCallback in the SMS sending request. Otherwise, log in to the SMS console and go to the sending details page to view the status code.