云消息服务 KOOMESSAGE-发送智能信息:请求示例

时间:2024-05-23 08:51:53

请求示例

  • 发送智能信息。模板ID为"600000001",短链最大解析次数为1次,过期时间为7天,发送手机号码如"131****0000";通道号为"8822053111111",短信模板ID为"15010661"。

    https://koomessage.myhuaweicloud.cn/v1/aim/send-tasks
    
    {
      "task_name" : "智能信息发送",
      "sms_channel" : {
        "channel_number" : "8822053111111",
        "sms_tpl_id" : 15010661,
        "sms_sign" : "华为云 KooMessage ",
        "sms_app_name" : "KooMessage"
      },
      "resolve_task" : {
        "tpl_id" : "600000001",
        "resolve_times" : 1,
        "aim_code_type" : "individual",
        "domain" : null,
        "expiration_time" : 7,
        "params" : [ {
          "cust_flag" : "131****0000",
          "custom_url" : "https://www.example.com"
        } ]
      }
    }
  • 发送智能信息-动态参数。模板ID为"600000002",短链最大解析次数为1次,过期时间为7天,发送手机号码如"131****0000",分别设置动态参数;通道号为"8822053111111",短信模板ID为"15010661"。

    https://koomessage.myhuaweicloud.cn/v1/aim/send-tasks
    
    {
      "task_name" : "智能信息发送-动态参数",
      "sms_channel" : {
        "channel_number" : "8822053111111",
        "sms_tpl_id" : 15010661,
        "sms_sign" : "华为云KooMessage",
        "sms_app_name" : "KooMessage"
      },
      "resolve_task" : {
        "tpl_id" : "600000002",
        "resolve_times" : 1,
        "aim_code_type" : "individual",
        "domain" : null,
        "expiration_time" : 7,
        "params" : [ {
          "cust_flag" : "131****0000",
          "dync_params" : {
            "param1" : "参数1",
            "param2" : "参数2",
            "param3" : "参数3",
            "param4" : "参数4"
          },
          "custom_url" : "https://www.example.com",
          "sms_params" : [ "参数1", "参数2" ]
        }, {
          "cust_flag" : "131****0001",
          "dync_params" : {
            "param1" : "参数1",
            "param2" : "参数2",
            "param3" : "参数3",
            "param4" : "参数4"
          },
          "custom_url" : "https://www.example.com",
          "sms_params" : [ "参数1", "参数2" ]
        } ]
      }
    }
support.huaweicloud.com/api-koomessage/SendAIMTask.html