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.
- In your edna dashboard, go to Integration.
- 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.
- Go to the Testing tab.
- Verify the API key is specified or generate a new one, if necessary.
- Verify the callback URLs for broadcast statuses and incoming messages are specified as well.
- 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.
- Click Add phone. The added phone displays above the Enter a phone number for testing field.
- 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.
- 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:
where instead of
79000000000is your test number. Click Call Resource.
- Make sure the message is received on the specified device.