Testing WhatsApp Channel API

This article covers the process of testing the WhatsApp channel API. This way, you can test how the edna API for a WhatsApp channel works without having to register your own channel. To be able to start the testing process, you need to have an API key, callbacks, and test phone numbers set up in edna Pulse.

At the moment, testing is only possible for WhatsApp channels and only for sending and receiving chat messages. Testing sending template messages (HSM) via WhatsApp channels is currently not supported.
  1. In your edna dashboard, go to Integration.
  2. If you are planning to test the API, open the Settings tab, generate an API key and add callback URL for statuses and incoming messages.
  3. Go to the Testing tab.
  4. Verify the API key is specified or generate a new one, if necessary.
  5. Verify the callback URLs for broadcast statuses and incoming messages are specified as well.
  6. Enter test phone numbers from which you will message the test WhatsApp account. Specify the number in the 7хххххххххх format, where 7 is the country code. For example, you can add your own phone number. The number must be connected to the WhatsApp app and be available on some device.

  7. Click Add phone. The added phone displays above the Enter a phone number for testing field.
  8. Using a device with the phone number you specified in the previous step, follow the link or scan the QR code displayed on the page in edna Pulse.

    This opens a WhatsApp chat with our WhatsApp account set up specifically for testing. Send any message in the chat, then go to the Analytics > Messages page in edna Pulse and verify the message you just sent displays there in the list.
  9. Use the embedded API tool on the Testing tab of the Integration page, or call the API method from your own tool to send an outgoing (response) message to your test account.

    If you use the embedded tool on the Testing tab, enter the added test number to the respective string as follows:

    "subscriberFilter": {
    "address": "79000000000",
    "type": "PHONE"

    where instead of 79000000000 is your test number. Click Call Resource.
  10. Make sure the message is received on the specified device.
In this article