If anyone has worked with Twilio’s WhatsApp Business API you may be able to help.
Can you please confirm this: we purchased a UK number from Twilio but we are based and operate in Kuwait. So we will be using the UK number to send WhatsApp messages to users’ in Kuwait. Is that fine? Additionally, as we were waiting for Twilio to approve our number we received the attached image and not sure what it means.
We’ve contacted Twilio support but they’re taking a while to respond. Image:
- Note: we’ve been approved and Twilio is linked to our Facebook manager. So on the FB side we’re good to go, but just waiting for Twilio to approve our sender number so we can use the WhatsApp API.
2
Answers
Yes! WhatsApp uses phone numbers as identifiers, but the origin country of that phone number doesn’t matter, at least technically.
It appears that perhaps you still have a trial account and someone sent an SMS message to your number. While on trial, you can only send messages to numbers that you have verified.
The Twilio Sandbox for WhatsApp is a pre-configured environment that you can access through the Twilio Console. In this console, you can send outbound messages, reply to incoming messages, and configure callbacks for message delivery. Until you get your Twilio account verified, you can test its functionality with this sandbox account.
Here is the step for integrating WhatsApp sandbox API with Twilio:
Step 1: How to join sandbox Twilio
First, you need to sign up for a Twilio account. Second, you need to send a WhatsApp message to the given number. As you can see, my sandbox number is +1 XXX XXX XXXX and the message is joined with a hyphen. This message will be unique for every user. You can stop this anytime by sending a stop.
How to join sandbox API Twilio
Step 2: Send your first message with Nodejs
Install the “Twillio” package in your package.
Get your account sid and auth token from your Twilio account to connect with Twilio.
You can send WhatsApp messages with NestJs like:
when you run this route, you will get responses like:
You can also send media files, such as images and audio clips, to your users. So this is how you can integrate WhatsApp sandbox API with Twilio in Nodejs.