Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

SMS services are used to define SMS service integrations when the emakin system wants to send SMS messages.

Messages are tried to be sent through all SMS services in the service order until any of the SMS services returns a non-null value and not error.

Is Enabled

Specify whether the service is enabled or not.

Name

Name of service to identity.

SMS Gateway Code

Integration script for SMS service call.

The integration script called with a couple of predefined variables as follows;

Name of Variable

Description

$Destination

Phone number of SMS message to be send

$Message

Content of message

$Service

Reason for SMS send. (e.g. 2FA)

$Code

2FA verification code if specified.

Script content may vary depending on service definition but as an example the following script can be used;

var client = $Rest.Create('http://mysmsservice');

var request = client.Request('send');

request.AddObject({
    To : $Destination,
    Text : $Message
});

var reply = request.ExecuteJson();

if (!reply.IsSucceed)
    throw new Error('SMS send failed');

  • No labels