Clickatell.sendTextMessage()

Send a text message using the Clickatell SMS API

Usage

Hover over inputs/exits for more info.

var Clickatell = require('machinepack-clickatell');


// Send a text message using the Clickatell SMS API

Clickatell.sendTextMessage({

user: 'companyname',

password: '******',

api_id: 'GJD79867',

to: '2772000000',

text: 'Hello world',

from: '2772000000',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Invalid or unprovided API key. All calls must have a key.

wrongOrNoKey: function () {

 

},

// Invalid username or password.

wrongOrNoCredentials: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

user required

Your Clickatell username.

'companyname'
password required

Your Clickatell password

'******'
api_id required

Your Clickatell API id.

'GJD79867'
to required

Recipient SMS number.

'2772000000'
text required

Body of the text message.

'Hello world'
from

Sender SMS number.

'2772000000'

Exits

error

An unexpected error occurred.

'ERR: 101, Authentication failed'
wrongOrNoKey

Invalid or unprovided API key. All calls must have a key.

wrongOrNoCredentials

Invalid username or password.

success

OK.

'f7012c1edff2509a19ce1667c7f52b18'