Επεξεργασία

Κοινή χρήση μέσω


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

Set up

  1. Go to your Azure Communication Service resource in the Azure portal.

Screenshot that shows Azure Communication Services resource in Azure portal.

  1. Go to the Try Advanced Messaging tab.

Screenshot that shows Try Advanced Messaging in the Azure portal.

  1. 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.

Screenshot that shows WhatsApp Connect QR code in the Azure portal.

  1. 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.

Screenshot that shows sending the connection code to the Advanced Messaging Sandbox by Microsoft account.

  1. 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. 

Screenshot that shows Advanced Messaging WhatsApp connection established in the Azure portal.

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.

Screenshot that shows WhatsApp Send text message in the Azure portal.

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.

Screenshot that shows WhatsApp Send template message in the Azure portal.

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: