Posts tagged with twilio-api

As per Whatsapp policies and Twilio docs, the business initiated conversations require the pre-approved message templates. The Whatsapp API provides a programmatic way to maintain and approve such templates.

Is there an appropriate API endpoint on the Twilio side for the programmatic Whatsapp's templates management? I haven't found anything except the manual template submission using the Twilio console.

I'm looking into the Twilio Whatsapp API docs, and cannot find anywhere if it is possible to receive a message sent from a website webchat on a Whatsapp Business Account?

I would like to develop the following: a user is on my website, and has a quesiton. He/she then opens the chatbox and types their question (non-whatsapp). This message is then sent to the Whatsapp Business Account of the Client and they can talk back and forth with the user.

I hope I have been clear enough, please let me know if I need to supply more information.

I've been checking the documentation about WhatsApp Business API and Twilio Sandbox for Whatsapp and the only way I see to receive messages configuring URL for my application endpoints.

The thing is management and sec won't approve publishing an endpoint on our network to this matter. The acceptable way for them would be consuming messages from a client in the same way one connects to a mail server or any other service.

Is there any documented alternative to using endpoints to MY application?

Thx

Edit: I see that I can only use and send to numbers associated with Twilio. My question was to see if I didn't have to use numbers associated with Twilio, for example, if I were to make a website that can send numbers on WhatsApp, like my own WhatsApp web, how do I do that, as in how do I make a website that can send messages through WhatsApp just like WhatsApp web?

I want to make a python program, that asks for your number when you start it. It then asks for the number you want to send the message to. This code will ultimately be running on android if that helps.

from twilio.rest import Client  contact = '' contact = input('Which number do you want to send the message to: ') message = '' message = input('What do you Want to send: ') account_sid = '_'  auth_token = '_'  client = Client(account_sid, auth_token)  #some code to get my number #some code to get my number my_number = #i got my number   message = client.messages.create(                                from_='whatsapp:'+ my_number,                                 body=message,                                     to='whatsapp:' + contact ,                           )    print(message.sid) 

So it's the code to get the user's number that I need help with. Another option I've been considering is manually inputting the number and using that (I will add an OTP if I go this route but not rn). Which sounds like the better option?

I'm new to Twilio's APIs so any help would be appreciated.

I am integrating with the Twilio API to send WhatsApp for Business messages. For the most part, so far everything has been straight forward. However, I foresee the need to be adding new WhatsApp phone numbers and templates in the future. While I have no problem using the Twilio UI to create these new resources, I was curious if there was a way to list the newly added phone numbers and templates in my app via their API. This would help ensure an update to the application wouldn't be needed each time that a new phone number or template is added.

I have found this other question from over a year ago which may indicate that listing phone WhatsApp phone numbers currently isn't possible. However, this question doesn't address listing templates and due to its age I also wanted to reask the community in case anything has changed. Identify Whatsapp phone number when listing Twilio phone number

Thanks!