Shell短信营销接口对接示例代码
本示例介绍如何使用Shell调用互亿无线短信营销接口,完成短信群发。通过简单的 HTTP POST 请求,开发者即可在业务系统中集成营销短信功能,适用于促销活动通知、会员关怀提醒、节日祝福推送等多类营销场景。
示例将展示接口请求的基本流程、参数配置以及响应解析,帮助开发者快速掌握短信营销接口的调用方式。
json_data='{
"api_id":"sms-yx-xxxxxxxx", "signature":"xxxxxxxxx", "timestamp":1623643787,
"request_id":"xxxxxxxxxxxx", "product_id":1001,
"phone":["18800000000","18800000001"],
"sign_name":"xxxxxxxx", "content":"尊敬的会员您好:${name},您的订单号是:${order_no},拒收请回复R", "template_id":1,
"template_var":{"${name}":"张三","${order_no}":"202009041156181103"},
"send_time":"2020-08-26 16:08:14"}'
curl --http1.1 -X POST "https://api.ihuyi.com/sms-yx/v1/batchSend" -H "Content-Type: application/json" -d "$json_data"