短信
概念
短信签名
[1] 阿里短信签名规范
发送者属性的一种标识
限制字数
发送短信时,用中括号包裹
国际/港澳台短信不需要签名。通过国内运营商发送的短信需要签名
中文:【阿里云】、【弹性云计算】、【AGAN】(twilio发送给国内手机号的短信签名)
模板
英文
[1] 华为云
Verification Code SMSs
Scenario | Template Example |
---|---|
Login/Verification | Your dynamic code is ${NUM_6}. It is valid for 5 minutes. Do not provide it to anyone. |
Your verification code is ${NUM_6}. You are using the service platform. Do not provide this verification code to anyone. | |
Your verification code is ${NUM_6}. It is valid for 5 minutes. Do not provide this verification code to anyone. | |
Your verification code is ${NUM_6}. Finish the verification as soon as possible. Have a nice day! | |
Registration | Your registration code for membership is ${NUM_6}. Thank you! |
Changing the password | Your verification code is ${NUM_6}. If you did not perform this operation, ignore this SMS. |
Modifying the mobile number | You are modifying the registered phone number. The verification code is ${NUM_6} (valid for 5 minutes). To ensure account security, do not provide this verification code to anyone. |
Retrieving the password | You are retrieving your password. The verification code is ${NUM_6} (valid for 10 minutes). Do not provide this verification code to anyone. |
Login | Verification code: ${NUM_6}. You are logging in to the service platform. Do not provide this verification code to anyone. |
Modifying account information | Verification code: ${NUM_6}. You are changing important information. Keep your account secure. |
Notification SMSs
PSTN
公共交换电话网(Public Switched Telephone Network)
E.164
国际电话编号方案,确保 PSTN 上的每个设备都具有全球唯一的号码
doc
格式
1 | [+] [country code] [subscriber number including area code] |
- 最多有15位数字
示例
E.164 Format | Country Code | Country | Subscriber Number |
---|---|---|---|
+14155552671 | 1 | US | 4155552671 |
+442071838750 | 44 | GB | 2071838750 |
+551155256325 | 55 | BR | 1155256325 |
正则
1 | ^\+[1-9]\d{1,14}$ |
- 不是很准确