指定模板单发接口 tpl_value 参数参考示例


请参考如下示例对批量个性化发送接口中 tpl_value 参数传参


Java


String tpl_value = URLEncoder.encode("#company#",ENCODING) +"="
+ URLEncoder.encode("Yunpian", ENCODING) + "&"
+ URLEncoder.encode("#code#",ENCODING) + "="
+ URLEncoder.encode("1234",ENCODING);


python


tpl_value = urllib.urlencode({'#company#':'Yunpian','#code#':'1234'})


C Sharp


string tpl_value = HttpUtility.UrlEncode(
HttpUtility.UrlEncode("#company#", Encoding.UTF8)    + "=" +
HttpUtility.UrlEncode("Yunpian", Encoding.UTF8)      + "&" +
HttpUtility.UrlEncode("#code#", Encoding.UTF8) + "=" +
HttpUtility.UrlEncode("1234", Encoding.UTF8), Encoding.UTF8);


php


$data = array('tpl_id' => '1', 'tpl_value' => ('# company#').
    '='.urlencode('Yunpian').
    '&'.urlencode('#code#').
    '='.urlencode('1234'), 'apikey' => $apikey, 'mobile' => $mobile);