The WhatsApp Business Platform with Twilio: Best Practices and FAQs
With Twilio Programmable Messaging, you can integrate WhatsApp messaging into your web application. Although those integrations are generally straightforward, we often get asked about how best to utilize the Programmable Messaging API specifically for WhatsApp. We’ve also found some common patterns and best practices that’ll get you sending WhatsApp messages sooner.
Below are the answers to these frequently asked questions and some of our best practices for your integration of the WhatsApp Business Platform with Twilio.
Frequently asked questions
- What are the requirements for a business to be approved for WhatsApp?
WhatsApp requires compliance with the WhatsApp Business Solution Terms, with the WhatsApp Business Solution Policy, and with its Commerce Policy. As part of the approval process, the business and use case will be considered to make sure the usage is in line with the above guidelines.
- What is the cost of the WhatsApp service?
WhatsApp service is charged per message fees. Meta also charges fees per 24 hour window for each conversation which are passed on to you by Twilio. There are two types of conversations: Business-initated conversations and user-initated conversations. Business-initiated conversations can fall into three categories, depending on the category of the template used: marketing, utility or authentication. All Meta fees vary by country, based on the end user's country code. You can find more information about the cost of sending WhatsApp messages here.
- How can I manage separate access lists to Sandbox and to the live numbers on my account?
If you have the need to segment traffic and manage separate access lists, we recommend that you split the traffic between different Twilio accounts. This will allow you to have better control over each one of these use cases and will allow you to manage separate access lists for each account.
- What is the MPS (Messages Per Second) limit for outbound WhatsApp messages?
The WhatsApp Business Platform with Twilio supports a maximum messaging throughput per WhatsApp sender of 50 MPS (messages per second) for outbound traffic containing text-only and 1.5 MPS for outbound traffic containing media files. The text-only throughput for a WhatsApp sender is set to 10 MPS by default, but this rate can be increased up to the maximum of 50 MPS by request and pending approval upon review of the business's messaging requirements. Media throughput cannot be increased further at this time.
Messages sent at rates exceeding the configured throughput for the sender will be sent to a message queue and dequeued for delivery at the throughput rate set. This message queue has a maximum limit of four hours. Messages that remain in the queue for more than four hours will fail. New messages that will cause the queue to back up beyond the four hour time limit will be rejected and fail.
- If you require sending messages at high MPS for more than a few minutes, please contact our support team for guidance and best practices prior to your campaign. Twilio will make throughput adjustments if necessary to support your individual requirements and messaging volumes.
- Factors that may lead to lower throughput include sending large media files, sending high volumes of unique media files to each recipient user, sending messages containing URLs to websites with long load times, receiving concurrent inbound messages on the same WhatsApp number that is sending outbound notifications, and high network latency between servers and recipient users.
If you need higher MPS beyond what we can provide you per sender, you can use Messaging Services. This allows you to distribute high message volumes across many senders within a messaging service. You may also refer to our article on Scaling WhatsApp for additional best practices.
- 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 Programmable Messaging API Reference and Overview carefully. You’ll need to join a sandbox, as well as enable one of your Twilio numbers with WhatsApp.
- Why am I getting a message “Twilio could not find a Channel with the specified From address” when trying to send a message?
There are two common reasons why you are seeing this error:
Fromaddress in your Programmable Messaging API request is incorrect. To send messages using WhatsApp, the
Fromaddress should be
whatsapp:<sandbox phone number>. This can be found on the sandbox page here.
- You are trying to send a message from an account that does not have that sandbox installed. Please activate the sandbox before sending a message.
- I joined the Twilio sandbox for WhatsApp and got a “Twilio Sandbox. You are all set! The sandbox xyz can send/receive messages...” reply. Can I change the message?
This reply is part of our sandbox implementation and cannot be changed. Once you get your own number, you are free to set your own message. 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 two 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. Please see our instructions for getting started with the sandbox, including how users can join your sandbox.
- You are sending a free-form message outside the 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-approved template message to the user (for more details read up on template messages); any message that doesn’t match a pre-approved template will be sent by Twilio as a free-form message. You can find a list of templates pre-approved for the sandbox here.
- Can I check if a user’s phone number is enabled for WhatsApp?
Every time you send a WhatsApp message, Twilio automatically checks if the number is enabled for WhatsApp and will fail the message with error code 63003 if the destination was found to be invalid. WhatsApp has strict guidelines when it comes to checking for availability. When a number is found a valid WhatsApp number, it is required to follow up with a message to prevent the account from being marked for lower quality traffic. WhatsApp does not allow exposing the capability check and using that independently of sending a message.
- What formatting options do I have in WhatsApp?
See our guide to rich messaging features, including formatting, in the WhatsApp Business Platform with Twilio.
- Can I send messages to WhatsApp groups or manage groups?
WhatsApp deprecated the Groups API in April 2020. Twilio offers a group messaging solution using the Conversations API. You may reference this sample code in CodeExchange: WhatsApp Group Messaging. For more info, please refer to Twilio Conversations.
- Does the WhatsApp Business Platform with Twilio support read receipts?
Twilio supports read receipts on business-initiated messages. Currently, Twilio does not support read receipts for inbound (user-initiated) WhatsApp messages. This means it is not possible for the business to set the status of a message it received to "read" (i.e., changing the checkmark color on the end user's application).
Live Senders (WhatsApp-Enabled Phone Numbers)
- What use cases are supported by WhatsApp?
WhatsApp supports user-initiated and business-initiated messaging. With user-initiated messaging, the first message is received by the business from the user. This opens a conversation in which the business can reply back with free-form messages. The conversation remains open for 24 hours following the last message received from the user.
Business-initiated messaging is when the business sends the first message to the user, or replies to the user more than 24-hours after the last message received from the user. This typically applies to notification use cases. Business-initiated messaging requires the use of pre-approved templates.
- What account type options do I have for my business in WhatsApp? How do they appear in the app?
Information about available WhatsApp account types can be found here. You can apply for Official Business Account once your number is live and the Meta Business Manager account that is linked to your WhatsApp number is set to
- What kind of phone numbers can be enabled for WhatsApp?
WhatsApp requires a phone number to be e.164 compliant and to be able to receive an OTP (one-time PIN) code via SMS or phone call (to enable the service). This includes 10-digit long codes, local numbers, national numbers and toll-free numbers in most regions. Most numbers sold on Twilio are supported. Short codes are not supported. More info can be found here.
- How can I send and receive media on WhatsApp? What type of media is supported?
You can find information about how to send and receive media messages and supported media on WhatsApp here. We also have a more detailed, step-by-step tutorial for sending and receiving media on WhatsApp.
Troubleshooting WhatsApp Error Codes
- I’m getting error code 63020 when trying to send messages on WhatsApp. What should I do?
Error 63020 indicates that you have yet to accept the invitation from Twilio to send messages on your behalf on the business. Please go to your Meta Business Manager account and accept the invitation to be able to send and receive messages.
- Everything went well until I started receiving error code 63018 when I try to send messages. Why?
Error 63018 indicates that you have hit the rate limit set on your WhatsApp number. You can learn more about WhatsApp’s rate limit and how to plan your rollout around it here.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.