Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: TwimlResponse is not a constructor #1453

Closed
timburgess opened this issue Aug 19, 2019 · 1 comment
Closed

TypeError: TwimlResponse is not a constructor #1453

timburgess opened this issue Aug 19, 2019 · 1 comment
Assignees

Comments

@timburgess
Copy link

Running the demo server for twilio produces TypeError: TwimlResponse is not a constructor when the /sms/receive path is used.

package.json is specifying "twilio": "^3.30.3"

Handler code is

app.post('/sms/receive', bodyParser, (req, res) => {
  const sender = req.body.From
  const body = req.body.Body

  const resp = new TwimlResponse()
  resp.message(`Hello, ${sender}, you said: ${body}`)

  res
    .status(200)
    .contentType('text/xml')
    .send(resp.toString())
})
@fhinkel
Copy link
Contributor

fhinkel commented Sep 1, 2019

@timburgess 👋 Thanks for reporting the issue!

@michaelawyu Could you please have a look at this? Seems like there's a problem with the appengine/twilio sample. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants