How Do I Configure Variables in an SMS Template?
When calling the SMS Sending API or Batch SMS Sending API, you can use the templateParas parameter to configure variables.
templateParas is a list of SMS template variables used to fill in the variables in the template specified by the templateId parameter in sequence. Its value is in JSONArray format. For details, see Template and Variable Specifications.
The number and the length of variables in the list must be consistent with those defined in the template specified by the templateId parameter. For example, if the template specified by templateId contains two variables with lengths of 5 and 6, the list must contain two corresponding variables with lengths 5 and 6, respectively.
If the template content is "You have ${NUM_5} parcels delivered to ${TXT_6}, this parameter can be set to '["3","Gate of People's Park"]'.
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