I have integrated my IBM Watson assistant chatbot with WhatsApp that uses Twilio, and at the moment in Twilio I have a Trial WhatsApp Sandbox Number to be able to test the chatbot within WhatsApp.
Everything works fine till now but I am stuck a bit: I want from within the chat between my chatbot and my user, to automatically retrieve the user's phone number and send it back to IBM chatbot. Is this feasible? Even if I have a trial phone number at the moment?
Yes, Twilio will send a couple of parameters to your webhook when you receive a message. If you want to read the phone number, you can read one of these parameters:
FromThe phone number or Channel address that sent this message.
WaIdThe sender's WhatsApp ID (typically a phone number)