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"]'.
Template FAQs
- Template and Variable Specifications
- How Long Does It Take to Review a Template?
- How Do I Modify an SMS Template?
- How Do I Delete an SMS Template
- How Do I Use a General SMS Template? (Chinese Mainland SMS)
- How Can I View the Content and Related Information of an SMS Template?
- Can I Set the Text Format (Such as Underline and Font Color) in an SMS Message Template?
- What Can I Do If an SMS Template Is Approved and Deactivated?
- Do SMS Templates Support Links?
- How Do I Configure Variables in an SMS Template?
- Is There a Limit on the Number of SMS Templates and Use Times?
- How Do I Increase the Template Quota?
- Can I Customize SMS Content Without a Template?
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.
Chatbotmore