SMS Services

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.

image-20231212-164105.png

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

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');

 

Copyright © 2010 - 2023 Emakin. All rights reserved.