Skip to content

Instantly share code, notes, and snippets.

@gabrielmanara
Created October 9, 2020 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielmanara/860836608adf49e076c8eabdb1d2ad1f to your computer and use it in GitHub Desktop.
Save gabrielmanara/860836608adf49e076c8eabdb1d2ad1f to your computer and use it in GitHub Desktop.
Snippet
const messageGatewayService = async (body: string, to: string) => {
try {
const twilioClient = new Twilio(accountSid, authToken)
const message = await twilioClient.messages.create({
body,
messagingServiceSid,
to
})
return message
} catch (error) {
return error
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment