开发者社区> 问答> 正文

模板变量缺少对应参数值

swm_terry 2019-01-18 12:55:16 2503

!/usr/bin/env python

coding=utf-8

from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest
client = AcsClient('', '', 'default')

request = CommonRequest()
request.set_accept_format('json')
request.set_domain('dysmsapi.aliyuncs.com')
request.set_method('POST')
request.set_version('2017-05-25')
request.set_action_name('SendSms')

request.add_query_param('PhoneNumbers', '13533469097')
request.add_query_param('SignName', '数文明')
request.add_query_param('TemplateCode', 'SMS_156280509')

response = client.do_action(request)

python2: print(response)

print(str(response, encoding = 'utf-8'))

JSON 数据格式 Python
分享到
取消 提交回答
全部回答(2)
添加回答

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题