update
This commit is contained in:
@@ -16,7 +16,7 @@ import random
|
||||
|
||||
|
||||
# phoneNum="+8613243889782"
|
||||
def sendSms(phoneNum):
|
||||
def sendSms(phoneNum,verification_code=None):
|
||||
try:
|
||||
# 必要步骤:
|
||||
# 实例化一个认证对象,入参需要传入腾讯云账户密钥对secretId,secretKey。
|
||||
@@ -77,7 +77,7 @@ def sendSms(phoneNum):
|
||||
|
||||
# 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,,若无模板参数,则设置为空
|
||||
# 随机4位数字
|
||||
verification_code = '{:04d}'.format(random.randint(0, 9999))
|
||||
# verification_code = '{:04d}'.format(random.randint(0, 9999))
|
||||
req.TemplateParamSet = [verification_code]
|
||||
# 下发手机号码,采用 E.164 标准,+[国家或地区码][手机号]
|
||||
# 示例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号,最多不要超过200个手机号
|
||||
|
||||
Reference in New Issue
Block a user