ftos.identity.otp.send

IMPORTANT!  
Starting with v24.3.0, this is renamed from server.otp.sendOtp to ftos.identity.otp.send.

Sends a sms/email/IVR containing the server generated one-time password and returns the request ID to be used by method ftos.identity.otp.validate and ftos.identity.otp.getStatus.

This is a business logic method for business service components.

Syntax

With message parameter:

Copy
function ftos.identity.otp.send({"from": string, "to": string, "subject": string, "notificationProvider": string, "notificationChannel": string,"message":  string {{otp}}})

With messageTemplateName parameter:

Copy
function ftos.identity.otp.send({"from": string, "to": string, "subject": string, "notificationProvider": string, "notificationChannel": string,"messageTemplateName": string{{otp}}}, “otpTimeout“: number)
 
Parameter Type Description
from string Email address/Phone number of the sender.
to string Email address/Phone number of the recipient(s).
subject string Email subject (used only if the OTP is sent to an email address).
notificationProvider string

A string defining the provider which will be used to send the email/sms/ivr.

notificationChannel string The channel (SMS/Email/IVR) which will be used to send the OTP.
message string The message that will be sent with the OTP. Use the {{otp}} placeholder to specify where the OTP should be placed inside the message. This parameter cannot be used together with messageTemplateName.
messageTemplateName string The name of the message template used to construct the message to be sent with the OTP. The message template must contain the {{otp}} placeholder to specify where the OTP should be placed. This parameter cannot be used together with message.
otpTimeout number Expiration time of the OTP, in seconds. The default value is 300 seconds.

Examples