The MessageBird WhatsApp Sandbox allows you to try and prototype WhatsApp Business in a developer environment without going through the approval process. In this quickstart, you’ll learn how to get started with MessageBird’s WhatsApp Sandbox in 6 easy steps.
Step 1: Activate the sandbox
Step 2: Connect your device to the sandbox
You’ll now need to connect your device to the sandbox. You can do this in two ways:
- Scan the QR Code: Open your phone camera and focus it on the QR Code, click on the push notification, you have a prefilled message with the word “join” followed by a two-word entry code, send the message, and 🎉 you're connected!
- Two-word entry code: Save the WhatsApp Sandbox number as a new contact in your phone, now go to WhatsApp and send your unique two-word entry code to this number, and 🎉 you're connected!
Message received! Your device is now connected to the MessageBird’s WhatsApp Sandbox.
The ‘Waiting for Your Message’ box now reads "Congrats! You're now connected to the sandbox." This means you're ready to start messaging.
Note: For now, the WhatsApp Sandbox can only be active in one window at a time and only one user per Workspace can connect simultaneously. To successfully connect to the sandbox, make sure to close any additional active windows. If another user is already connected to the workspace, simply switch to another workspace.
Pro-tip: Want to leave this Sandbox and join another? Simply reply `Stop` at any time to the WhatsApp Sandbox.
Let's keep moving. Hit ‘Next: Send an outbound message.’
Step 3: Choose a WhatsApp Message Template
It’s time to choose a WhatsApp Message Template. The displayed templates have already been submitted approved by WhatsApp, so you can start using them straight away.
You have three Message Template options:
- Customer Support
- User Verification (2FA)
- Order Notifications
Check out some more examples of approved use cases for the WhatsApp Business solution.
Go to our Message Templates quickstart to learn more about it.
Step 4: Send a Template Message from the sandbox
In this step, the sandbox is replicating a business-initiated conversation via the WhatsApp API using Message Templates.
We've chosen some custom variables for each Message Template. Feel free to play around with the custom variables using the text boxes.
You can go back and forth step 3 and step 4 as many times as you want. Ready to go? Click ‘Send a message’ and tada 🎉 your WhatsApp Message Template with custom variables will be sent to your device.
You can also use the code snippet on the right side of the sandbox to send a message from your project. You'll see an example response in the field below.
Easy, right? Let's start a conversation by sending a reply from your device.
Pro-tip: The dynamic API request automatically updates depending on the custom variables that you set, so you can use the code snippets from the sandbox to start building while waiting for the WhatsApp approval.
Step 5: Send a reply from the device
In this step, the sandbox is replicating a customer-initiated two-way conversation via the WhatsApp API.
You can now write a response from your device to the sandbox number. This will enable a 24-hour conversation session, during which you can freely chat with yourself—to and from the sandbox. You can send as many replies as you want—the reply will automatically update.
Once you send a reply to the sandbox, the ‘Waiting for a message’ field will update with your message. Awesome, your 24-hour session is enabled. You're ready to continue the two-way conversation with the sandbox.
Step 6: Send a reply from the sandbox
This time you're not limited to a pre-approved WhatsApp Message Template because you're still in the 24-hour two-way conversation window. You can reply to the responses and the other way around as much as you wish.
Step 7: Configure webhooks
You can connect the WhatsApp Sandbox to your application by configuring webhooks in the WhatsApp Sandbox settings. All you need to do is enter your webhook URL to the input field and hit save. This will now POST all WhatsApp Sandbox events to your webhook URL.
Note: You can configure up to 5 webhook URLs with the WhatsApp Sandbox.
For more information about configuring webhooks via the API, check out the WhatsApp Sandbox Developer Documentation.
Good job! 🎉 You've completed the MessageBird’s WhatsApp Sandbox Quickstart.
You may now want to check out these resources: