Twilio webhooks / TwiML requests

52 views
Skip to first unread message

akar...@gmail.com

unread,
Aug 16, 2016, 8:12:22 PM8/16/16
to back{4}app
Hey all,

I have a parse app and cloud code in it. I'm using twilio for a messaging service, and when I receive a message to a specific number I own, I want to send a reply to the person sending the message. Usually this would be done like this:

1- user sends message to twilio number
2- twilio receives the message and makes a request to a URL we provide
3- That URL is the URL for calling a cloud code
4- cloud function sends a reply back to the number with twilio api

I set the URL to be the address of a cloud code (https://parseapi.back4app.com/function/twilio) but I get 401 unauthorized because I can not set headers for Parse Application ID and Parse Rest Api Key in the twilio interface. Parse used to support http basic auth (http://appId:k...@api.parse.com/1/functions/twilio) but I couldn't get basic auth to work with back4app. How can I correctly authenticate requests I get from twilio without being able to modify headers?

Best,
Ahmet

yanga...@gmail.com

unread,
Aug 17, 2016, 8:22:15 AM8/17/16
to back{4}app
I'm using nexmo but similarly my cloud code that used to work on parse is erroring here with 400, 404 or 401s.  basic auth via get seems not to work.

can you get your code to work using a REST test client?  are you using express? If so you are farther along than me...

Davi Macêdo

unread,
Aug 18, 2016, 1:44:22 PM8/18/16
to back{4}app
Hi, Ahmet. Please reach us through web-site chat. We can setup hosting for you. Best!
Reply all
Reply to author
Forward
0 new messages