Created
October 9, 2020 15:24
-
-
Save gabrielmanara/860836608adf49e076c8eabdb1d2ad1f to your computer and use it in GitHub Desktop.
Snippet
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 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