Help Center> Message & SMS> FAQs> Template> Template and Variable Specifications
Updated on 2024-01-22 GMT+08:00

Template and Variable Specifications

You can only send SMSs with approved templates. A template consists of fixed texts and variables or only fixed texts. The variables change according to the SMS message content.

Apply for several SMS templates in advance according to service requirements and reserve sufficient time for review. Templates can be reviewed only on workdays.

Read the following specifications and mak sure that your SMS message templates comply with the common specifications and special specifications of each template type.

Common Specifications

Template Specifications

Format

Each template contains no more than 500 characters.

  • A template cannot contain square brackets. Templates with square brackets may be confused with signatures, causing SMS message sending failures.
  • Special characters (such as ¥★^_^&√※) are not supported. Such special characters may cause garbled characters in SMS messages.

Content

Use as much fixed text as possible so that the meaning and application scenario of the SMS can be understood.
  • Unauthorized invitations are not allowed to send, including sign-up, membership, and event invitations.
  • Real estate, game, and education enterprises can use only the verification code SMSs.
  • Do not send SMSs that contain the following information: stocks, immigration, finance, job interviews, gambling, ballgame betting, lottery, rebates, loans, payment reminders, investments, prizes, one-dollar flash sales, counterfeit goods, medical care, cosmetic surgery, beauty care, clubs, bars, porn, drugs, foot spa, threats, fur, exam assistance, trademark registration, group invitation, QQ or WeChat invitation, selling of personal data, app download links, rebates for positive comments, promotional SMS channels, user attraction, user retention, operators (value-added services, customer service center, China Mobile, China Unicom, China Telecom, Tencent king cards, and group SMS messages), essay writing services, board and card games, online games, lawsuits, summons, credit blacklists, governments, right safeguarding, crude oil futures, precious metals, private equity, comment modification on Taobao, studying abroad, overseas investments, bills of exchange, business and commerce agents, invoice issuance, partner recruiting, registration invitations, mobile numbers included in the SMS for driver license annual review, software selling, selling of mobile phones or knockoff devices, delivery confirmation, contraband, virtual currencies, stamps, debt collection, religions, superstitions, COD e-commerce, friend-making, dating, POS machines, bonus point redemption, weddings and funerals, and other illegal content.

An SMS signature is automatically added to a message, so do not add one to a template.

Variable Specifications

Each template can contain a maximum of 20 variables, excluding continuous variables. (If characters not containing spaces exist between variables, the variables are discontinuous.)

The system supports variables listed in the following table. You can choose a proper variable format and length.

Variable Format

Type

Example Value

Description

${TXT_Digit}

Character

${TXT_20}

Digit indicates the maximum length. The value can be 1 to 20 characters.

One non-English character, one English letter, one digit, or one English punctuation mark is counted as one character.

Set this parameter based on the site requirements. Do not set this parameter to a large value.

Note: The variable value cannot contain braces ({ }). Otherwise, template variables may fail to be parsed.

${NUM_Digit}

Digit

${NUM_6}

Digit indicates the maximum length. The value can be 1 to 20 characters. One digit is counted as one character.

When sending an SMS message, enter a number ranging from 0 to 9. The number cannot contain other characters, such as hyphens (-).

Set this parameter based on the site requirements. Do not set this parameter to a large value.

${DATE}

Date

${DATE}

The date in an SMS message is in yyyy/MM/dd format, for example, 2017/07/16, 2017/7/16, or 2017/7/1.

${TIME}

Time

${TIME}

The system supports the following time formats:

  • HH:mm, for example, 14:30
  • HH:mm:ss, for example, 14:30:30

Specifications for Each Template Type

In addition to the common specifications, each template type has the following specifications:

Category

Variable Specifications

Content Specifications

Verification code template

  • Only one variable is supported for entering the digital verification code.
  • The maximum length of the verification code variable must be less than or equal to 6 digits.
  • A Chinese mainland SMS must contain a verification code, registration code, or dynamic code.

Notification template

The link and contact information cannot be sent using variables. Enter the link and contact information using fixed texts in the template.

  • Marketing promotional information is not allowed.
  • The template specifications may be adjusted in real time based on the carrier's rules. The final template review result prevails.
  • If your violation causes bad influence, serious measures will be taken and your account will be blocked. Strictly comply with the specifications to enhance service security.

Template FAQs

more