While the Twilio API for WhatsApp lets you easily integrate WhatsApp messaging into your web app. Although those integrations are generally straightforward, we see some common questions about how best to utilize the API. We've also found some common patterns and best practices that'll get you sending WhatsApp messages sooner.
Following are answers to frequently asked questions and some of our best practices for your integration of the Twilio API for WhatsApp.
- Why am I getting a message "your number is not associated with the sandbox channel"?
Be sure you follow the instructions in the Using Phone Numbers with WhatsApp section of the API Reference and Overview carefully. You'll need to join a sandbox, as well as enable one of your Twilio numbers with WhatsApp.
- I joined the Twilio sandbox for WhatsApp and got a "Twilio Sandox. You are all set! The sandbox xyz can send/receive messages..." reply. Can I change the message?
This Sandbox reply message is part of our sandbox implementation and cannot be changed. Once you get your own number, you are free to set your own implementation. Just keep in mind that WhatsApp requires brands to receive customer opt-in before sending messages on WhatsApp.
- My outbound message from the Sandbox was not delivered. Why ?
There are 2 reasons why a message sent from the Twilio Sandbox for WhatsApp would fail to be delivered :
- You are trying to send a message to a user who has not joined your sandbox. See here for instructions on how they can join your sandbox.
- You are sending a free form message outside a WhatsApp session to the user. A WhatsApp session lasts for 24 hours after the last inbound message you receive from a user. Outside a WhatsApp session, you may only send a pre-registered template message to the user (see here for more details); any message that doesn't match a pre-registered template will be sent by Twilio as a free form message. See a list of templates pre-registered for the sandbox here.
- Can I check if a user's phone number is enabled for WhatsApp ? Currently, we do not offer an API to check if a user's phone number is WhatsApp enabled. WhatsApp requires that you collect explicit user opt-in to message them via WhatsApp, so we recommend that you ask them if they have a WhatsApp enabled number. However, sending a WhatsApp message to a phone number that is not WhatsApp enabled will fail.
- What formatting options do I have in WhatsApp?
Your messages can be bold, italicized, struck-through, or
||Your total is *$10.50**.
||Welcome to _WhatsApp_!
||This is ~better~ best!
|Code / Pre-formatted
||Three backticks (```)
||```print 'Hello World';```
The text inside the formatting symbols will take on the format you choose.
- Can I send messages to WhatsApp groups or manage groups ?
Currently, our API does not support messaging with or managing WhatsApp groups. We expect to add support for groups in the future.
- Do I need to request Facebook directly to approve my Twilio number for WhatsApp ?
In order to use Twilio API for WhatsApp in production, you need to be approved by WhatsApp (fill out this form to request access, and Twilio will work with WhatsApp for this). You do not need to request approvals or numbers directly from Facebook; Twilio will manage that for you. Once approved, you can manage these numbers in the Twilio console. For more details, see here.
- Is it possible to port an external number outside of Twilio to use WhatsApp?
At this time, you need a Twilio number enabled for WhatsApp in order to send messages using the Twilio API for WhatsApp. This can be any Twilio number which has voice or SMS capabilities. In the future, we expect to be able to offer the ability to enable WhatsApp Business profile on your own, non-Twilio numbers as well. Meanwhile, for information on porting your numbers to Twilio, see these help article : https://support.twilio.com/hc/en-us/articles/223179348-Porting-a-Phone-Number-to-Twilio
- What verified or confirmed options do I have for my business in WhatsApp? How do they appear in the app?
There are three verified and confirmed statuses possible with WhatsApp:
||WhatsApp has verified that an authentic brand owns this account. A Verified account has a green checkmark badge in its profile. Very few businesses will be WhatsApp verified. Being verified on Facebook or Instagram will not help your business be WhatsApp verified.
||WhatsApp has confirmed that the phone number of this account matches the phone number for this business. A confirmed account has a gray checkmark badge in its profile.
||An account that is using one of WhatsApp's business products, but hasn't been confirmed nor verified by WhatsApp. A business account has a gray question mark badge in its profile.
To see how these verification statuses appear inside of WhatsApp, see our API Reference and overview. Once your Twilio number is enabled for WhatsApp, we will submit your business for verification / confirmation.