Quickstart: Try Advanced Messaging for WhatsApp sandbox
Getting started exploring the Advanced Messaging features for WhatsApp. Advanced Messaging provides a sandbox experience on the Azure portal where developers can experiment with sending template and text messages to a WhatsApp user.
Prerequisites
- Create an Azure Communication Services resource
- Mobile device with the ability to read QR codes and signed into WhatsApp app
Set up
- Go to your Azure Communication Service resource in the Azure portal.
- Go to the Try Advanced Messaging tab.
- Before you can send a message to a WhatsApp end user from the sandbox on Azure portal, the WhatsApp user first needs to join the sandbox. On your mobile device with WhatsApp installed, scan the QR code on the Connect to WhatsApp page with your mobile device. This redirects you to a WhatsApp chat with the "Advanced Messaging Sandbox by Microsoft" account.
- Find the unique message code on the Try Advanced Messaging page (ex. "connect ABC12"). Type then send this unique message in your WhatsApp chat with
Advanced Messaging Sandbox by Microsoft
.
- Once we receive the keyword message, we reply with confirmation to you, indicating that you successfully joined the sandbox. And we also save your WhatsApp phone number, which is used as the recipient number when sending messages from the sandbox.
Send text message
Once connected, you're able to send either a template message or a text message. Here's an example of sending a text message.
Send template message
The sandbox also has a few preconfigured templates for you to try out. Fill in the parameters to replace the double-bracketed numbers in the template message.
Note
There is one constraint from WhatsApp known as the 24-hour window. If a WhatsApp user has sent your application a message — whether it’s a reply to one of your outbound messages, or they have initiated communication themselves — your application has a 24-hour window (sometimes called a “24-hour session”) to send that user messages that don’t need to use a template. When your application sends a message to a WhatsApp user outside a 24-hour session, the message must use an approved template.
Next steps
In this quickstart, you tried out Advanced Messaging for WhatsApp sandbox. Next you might also want to see the following articles: