Created
August 9, 2021 23:05
-
-
Save bramses/6634ddfdffde7e2c90985eda13d5ee6e to your computer and use it in GitHub Desktop.
Receiving a Message on NodeJS with Twilio
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
router.post('/sms', async (req, res) => { | |
const twiml = new MessagingResponse(); | |
await workflow(`${req.body.Body}`) | |
res.writeHead(200, {'Content-Type': 'text/xml'}); | |
res.end('Message Received'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment