Twilio WhatsApp - Already bought phone number and creating messages - twilio

To send an SMS we can do:
await twilio.messages.create({
to: "07888888888",
from: twilioMessagingServiceSid,
body: "Body of message",
});
When using Whatsapp is it possible to do the same in the from parameter as in passing the twilio messaging service sid?
I would like to be able to support both SMS and WhatsApp for our customers using the same phone number that is already in use for SMS messaging.

Twilio developer evangelist here.
You can enable your Twilio number to send WhatsApp messages as well as SMS messages. There are a few steps to go through, at a high level they look like this:
Request access to enable your Twilio numbers for WhatsApp
Submit a WhatsApp Sender request in the Twilio console
Approve Twilio to message on your behalf in the Facebook Business Manager console
Submit your Facebook Business Manager account for Business Verification
(Twilio completes your WhatsApp Sender registration)
The full instructions to connect your Twilio number to your WhatsApp Business Profile are available in the documentation here.
Once you have done that, you can add your WhatsApp enabled number to the messaging service. Then, when you send a message to a WhatsApp number you can use the messaging service as the from and a WhatsApp number as the to.

Related

Can i directly send message to recipient using Twilio WhatsApp api without using join [key-word]. Is it because of Twilio Sandbox?

Can I directly send message to recipient using Twilio WhatsApp api without using join [key-word].
Is it because of Twilio Sandbox?
If I send request to enable my Twilio number of WhatsApp, issue will get resolved and I can send messages directly?
The join [key-word] system is just for the Twilio Sandbox for WhatsApp. It allows Twilio to use one WhatsApp number for all accounts that are testing with the Sandbox.
Once you have connected your Twilio number to your WhatsApp business profile you will be able to send messages to your users without requiring them to message you first. Note that WhatsApp does still require an explicit opt-in from your users before you can send to them. Also, for initiating conversations you will need to get template messages approved and then use the template as the first message. But the technical barrier of the join message will not be in your way.

Is it possible to receive a message from a webchat (on a website) and forward this message to Whatsapp using Twilio?

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.
Twilio developer evangelist here.
I believe that this would be possible to do for one user messaging at a time, but practically and at scale, not really useful.
If you have a user sending a message through a website that is then delivered to a user through WhatsApp, you could build an application that allowed the user on WhatsApp reply to the message and relay that back to the website.
However, if you have one WhatsApp number registered to send messages on behalf of your application and multiple users were sending messages through the website, all the messages would come from that one WhatsApp number and it would be practically impossible for the user responding in WhatsApp to know who they were responding to.
It would likely be better to connect your users via webchat within the web application and use WhatsApp to notify the the client that there are new messages awaiting their reply.

how to move from sandbox to prod on twilio whatsapp

Twilio Whatsapp - we have tested successfully on sandbox for our whatsapp messaging but how do we migrate it to prod. can someone help help how we can configure for prod.
Twilio developer evangelist here.
To move to production for WhatsApp you should follow the steps outlined in this tutorial.
At a high level the steps are:
Request access to enable your Twilio numbers for WhatsApp
Submit a WhatsApp Sender request in the Twilio console
Approve Twilio to message on your behalf in the Facebook Business Manager console
Submit your Facebook Business Manager account for Business Verification
(Twilio completes your WhatsApp Sender registration)
The tutorial has more details about the steps needed to enable WhatsApp for production use with Twilio.

Twilio whatsapp integration

Is it possible to send/receive SMS from whatsapp using twilio number? Anybody tried twilio with whatsapp? I asked customer care, if it is possible, he said, not sure but many people asked about that.
In case anyone else lands here, Twilio just released a WhatsApp integration via their new Business API
https://www.twilio.com/whatsapp
Twilio developer evangelist here.
Whatsapp do not have an API, so it is not possible to send or receive messages to Whatsapp using the Twilio API either.
If you are looking to send and receive messages to services like Whatsapp, then you might be interested in Twilio Channels. Channels are the various APIs that we are integrating into the one Twilio API so it's easy for you to send to all these third party services.
Channels lets you send and receive messages to services like:
Facebook
Slack
HipChat
Line
SendGrid (for email)
Twitter
Amazon Alexa
Viber
And will be supporting the following soon:
WeChat
Kik
BBM
You can sign up for early access to Channels here: https://www.twilio.com/marketplace/channels

Is it Required to Verify receiver numbers on twilio

I am using Twilio API to send SMS to users .
My question is here that is it required to verify every reciver numver on twilio?
right now its saying for every receiver.
"The number is unverified. Trial accounts cannot send
messages to unverified numbers; verify at
twilio.com/user/account/phone-numbers/verified, or purchase a Twilio
number to send messages to unverified numbers."
Thanks
Dalvir
Twilio developer evangelist here.
It is only required to verify numbers that you want to send SMS to when your account is in trial mode. If you upgrade your account you will be able to send SMS messages to any number.

Resources