How to get started with 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 4930609859535 with the contentSTART(STARTmust be in all UPPERCASE)

  • Use this QR code:

As a response, you will receive your TestAPIKEY.This API-KEYis associated with your phone WhatsApp number. Now you are able to use the 360dialog WhatsApp API.

2

Set your Sandbox Webhook URL

Use the following call:

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

Name
Description
Key

D360-API-KEY (string)

1234567_sandbox

7IuLe3Tiy8Rc

Request Body

Name
Description
Key

url (string)

Your webhook URL

ZJNvBEj2kIZR

{
    "url": "https://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

Name
Description
Key

D360-API-KEY (string)

1234567_sandbox

u2IZcEqtU5HE

Request Body

Name
Description
Key

recipient_type (string)

individual

OdwjcoBby9EN

to (number)

Your number

cj7rYJ4iOSLl

type (string)

text (default)

dHlp6k07AtU2

text (object)

contains body field

70HnBRIrmj12

{
    "messages": [
        {
            "id": "message_id"
        }
    ],
    "meta": {
        "api_status": "stable",
        "version": "2.31.5"
    }
}
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:

  • disclaimer Using this template will just send a regular text message, which can’t be edited.

  • first_welcome_messsage This is an example of a template with a personalization possibility (you can personalize the receiver's name).

  • interactive_template_sandbox This template contains 2 buttons for which you can pass customer URLs.

Last updated

Was this helpful?