/app3.js Secret
Created
July 5, 2023 19:10
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
app.post('/startReminder', async (req, res) => { | |
console.log(req.body) | |
let name = req.body.name | |
let number = req.body.number | |
let date = req.body.date | |
let time = req.body.time | |
await client.calls.create({ | |
url: ngrok_url + '/agent' + `?name=${name}&` + `date=${date}&` + `time=${time}`, | |
to: number, | |
from: process.env.FROM_NUMBER, | |
machineDetection: "DetectMessageEnd", | |
machineDetectionTimeout: 45, | |
asyncAmd: true, | |
asyncAmdStatusCallback: ngrok_url + "/amd" + `?name=${name}&` + `date=${date}&` + `time=${time}`, | |
asyncAmdStatusCallbackMethod: "POST" | |
}); | |
return res.sendStatus(200) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment