Sandbox (Test API Key)
Get a Test API key for our Sandbox Environment and try out our WhatsApp Business API.
We provide a developer-friendly test environment, for anyone that wants to check out the usage of our WhatsApp API. The WhatsApp API allows for direct-like access to the WhatsApp Business API. In the test environment, you can test sending messages and templates as described in the WhatsApp messages docs and receive a Webhook as described in the WhatsApp Webhook docs.
Sandbox Base Path: https://waba-sandbox.360dialog.io/
Each phone number has its own Test API-KEY, and you are able to test sending messages/templates only to your phone number.
Limitations
What you can do in the Sandbox
You can use the Test API-KEY to send
textmessages and templates to your own phone number.A maximum of 200 messages can be sent with the sandbox.
Your phone number acts like a user and can send and receive messages.
The number can be a landline number, as long it is able to use WhatsApp.
You can switch the endpoint at any time. If you don't have one yet you can use a free services like RequestBin or webhook.site to set up an endpoint.
Each Sandbox API Key is linked to one phone number and you can only send test messages to that phone number. If you wish to test messages with more than 1 number then it is advised to set up a test WhatsApp Business Account (Staging WABA) to use instead of the Sandbox.
What you can't do with the Sandbox
The Sandbox is a test environment only. Messages and Templates can be sent only to your own phone number.
You can send two types of templates – marketing and interactive.
We do not yet provide response information when you use the WhatsApp API.
Uploading and retrieving media files using the media ID.
How to use the Sandbox
1. Get a Test API Key
To get a test API-KEY you can:
Send a WhatsApp message from your phone to the phone number
4930609859535with the contentSTARTUse this link: https://wa.me/4930609859535?text=START
Use this QR code:

As a response, you will receive your TestAPI-KEY.This API-KEYis associated with your phone WhatsApp number. Now you are able to use the 360dialog WhatsApp API. You can set your own Webhook or send an unlimited number of messages and limited (10) templates.
2. Set your Sandbox Webhook URL
Set Webhook URL
POST https://waba-sandbox.360dialog.io/v1/configs/webhook
Inbound messages sent by you to your WhatsApp Phone Number will be sent to your Webhook. You can use an external service (such as requestbin.com) to test webhook responses, or you can create your own webhook server for tests. In the case you want to test with localhost, you may use an external service (such as ngrok). Use the API-KEY as authorization, with the value D360-API-KEY.
Headers
D360-API-KEY
string
1234567_sandbox
Request Body
url
string
Your webhook URL
3. Send a Message to the Sandbox
Now, send another message (any message) from your device to the Sandbox number: 4930609859535.You will receive the Inbound Message Notification on your webhook 😀
4. Respond using the Sandbox API
Send response message
POST https://waba-sandbox.360dialog.io/v1/messages
You can send a response message (or a message template) to your phone WhatsApp number with the above request URL and the body parameters as described below. Use the API-KEY as authorization, with the value D360-API-KEY.
Headers
D360-API-KEY
string
1234567_sandbox
Request Body
recipient_type
string
individual
to
number
Your number
type
string
text (default)
text
object
contains body field
Example Request Payload
5. Send a Template Message (optional)
There are 3 templates available to test in the Sandbox. There is no possibility to add or edit a Sandbox templates, you must use the predefined templates. Templates are:
disclaimerUsing this template will just send a regular text message, which can’t be edited.first_welcome_messsageThis is an example of a template with a personalization possibility (you can personalize the receiver's name).interactive_template_sandboxThis template contains 2 buttons for which you can pass customer URLs.
You always have to use the predefined namespace which is c8ae5f90_307a_ca4c_b8f6_d1e2a2573574.
Send Template Message
POST https://waba-sandbox.360dialog.io/v1/messages
Headers
D360-API-KEY
string
Sandbox API KEY
Request Body
to
number
Your number
type
string
Message type
namespace
string
Template namespace
language
string
Template language
policy
string
Delivery policy
code
string
Language code
name
string
Template name
Example Request Payload
first_welcome_messsage
Note that this example covers first_welcome_messsage with personalization. In the case of the disclaimer template, the payload is similar but without the componentsobject (it holds personalization parameters which are not used in disclaimer).
disclaimer
interactive_template_sandbox
Code Examples For Developers
CURL
Creating API Key
Send a WhatsApp message START to the number 4930609859535. In the following examples, we assume your phone number is 49YOURNUMBER. Save API Key (in the examples will be YOUR_API_KEY).
Setting your webhook (optional)
Use external service e.g. requestbin.com to test webhook answers, or create your own webhook server for tests. In the case you want to test with localhost you may use e.g. external ngrok.com service.
Then set your webhook:
Now you may send any messages to the number 4930609859535. You will receive all webhooks as described in WhatsApp API https://developers.facebook.com/docs/whatsapp/api/webhooks
For example, when you send a message with content abcd you will receive the message:
Test sending messages
In your webhook, you will receive messages about status updates. For example:
Test sending templates
Similarly to sending text messages, you will receive webhooks with status updates.
Last updated
Was this helpful?