Search code examples
twilio-api

How to send whatsapp messages via twilio and manage the replies via the mobile phone?


I would like to send a Whatsapp message via Twilio and be able manage the response via whatsapp mobile app. So i want the same account to be accessed via the api and the mobile App. Twilio gives me the error message below :

"This number is registered to an existing WhatsApp account. To use this number, disconnect it from the existing account. Then, return to this page and re-enter the number. Note: It may take up to 3 minutes for the number to become available."

How can I accomplish this?

I use this code to send whatsapp message via Twilio :

  TwilioClient.Init(_Configs.Twilio.SID, _Configs.Twilio.Token);

                var message = MessageResource.Create(
                    body: whatsapp.Message,
                    from: new Twilio.Types.PhoneNumber("whatsapp:" + _Configs.Twilio.FromNumberWhatsapp), 
                    to: new Twilio.Types.PhoneNumber("whatsapp:+27" + whatsapp.CellNumber.Trim().Substring(1))
                );

Please recommend another service provider if it cant be done via Twilio.


Solution

  • This error message is correct. You cannot use a WA number on a mobile phone and on Twilio (or any other communications platform). If you want to use a mix of human-written and automated messages, you can build an application where a user can write the message that is then sent via the API.