Created
May 6, 2019 15:42
-
-
Save rwbrockhoff/ce2882c6827b3637f832c9f4f7f0b175 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bulkPhoneNumberList = invitations.map(person => { | |
return `{\"binding_type\":\"sms\",\"address\":\"+1${person.phone_number}\"}`; | |
}); | |
const response = await client.notify | |
.services(process.env.TWILIO_NOTIFY_SID) | |
.notifications.create({ | |
toBinding: phoneNumberList, | |
body: `Welcome to HyperCarrot! \nYou've been invited by ${orgName}. Click below to get started!\n${ | |
process.env.FRONTEND_URL | |
}/register/mobile/${textInvitationToken}` | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment