notification.sms
Sends an SMS to a user, at the phone number on their account.
WARNING
Due to the regulations of service providers in some countries, SMS services are disabled by default. To have the SMS system enabled, please contact a MODLR admin with the use case for SMS to have it reviewed.
js
notification.sms(userId, content)Parameters
| Parameter | Type | Description |
|---|---|---|
userId | number | The user's id. |
content | string | The text of the message. |
Returns
booleantrue if the SMS was sent, otherwise false.
TIP
The user must have a phone number for the SMS to be delivered. Users can update their phone number from the Manage Account page.
Examples
js
notification.sms(1, "Hello. This is a test SMS");