简体   繁体   中英

Any way to retrieve phone number from incoming sms in autopilot

I am creating a Twilio Autopilot program that works on the SMS channel. Currently, I set up the sms channel using the messaging URL and webhooks according to the instructions in the SMS setup section here: https://www.twilio.com/docs/autopilot/guides/how-to-build-a-chatbot . This works, but I am trying to find a way to retrieve the phone number from the incoming SMS to try and match it to a user to provide context to the bot ahead of time. Is there any way to accomplish this? I am coding this in Python but any advice would be appreciated regardless of language.

TheAutopilot webhook request is documented here and shows the parameters that are sent with each request.

In this case, you are looking for the UserIdentifier parameter in the incoming request, which, in the case of voice or SMS channels, will be the user's phone number.

Note that the request is made in the application/x-www-form-urlencoded format.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM