new SmsSingleSender(appid, appkey)
SmsSingleSender
Parameters:
Name | Type | Description |
---|---|---|
appid |
string | sdk appid |
appkey |
string | sdk appkey |
Methods
send(SMS, nation, phone, SMS, extend, ext, request)
Send a single SMS message
Parameters:
Name | Type | Description |
---|---|---|
SMS |
number | message type, Enum{0: normal SMS, 1: marketing SMS} |
nation |
string | dialing code, eg. china is 86, usa is 1 |
phone |
string | number |
SMS |
string | message content |
extend |
string | field, default is empty string |
ext |
string | field, content will be returned by server as it is |
request |
function | handler, method signature: function(error, response, responseData) |
sendWithParam(nation, phone, template, template, Sms, extend, ext, request)
Send a single SMS message with template paramters
Parameters:
Name | Type | Description |
---|---|---|
nation |
string | dialing code, eg. china is 86, usa is 1 |
phone |
string | number |
template |
number | id |
template |
array | parameters |
Sms |
string | user sign |
extend |
string | field, default is empty string |
ext |
string | field, content will be returned by server as it is |
request |
function | handler, signature: function(error, response, responseData) |