Below are all the points and troubleshooting mechanisms to resolve the issue:
Refer to the below image to locate the callback option.
If the callback URL toggle is OFF. You can see incoming messages under Inbound Messages | Events field.
Messages and events logged under this field are stored temporarily meaning if you refresh the app's setting page the logs will be cleared.
1. To set your callback it must comply following:
- The callback should return HTTP_SUCCESS (code: 2xx)
- The callback URL should have public access. If it is private, the incoming server IP should be whitelisted.
- The callback URL should accept HTTP header: User-Agent
2. To understand what actual request your Gupshup's WhatsApp app is sending on your callback URL while setting it, follow the below approach:
- Search for webhook tester tools like requestbin, webhook.site, etc and generate a web service URL and insert the same in your WhatsApp app as a callback
- For example, If I generate a test URL on webhook.site and set that URL as a callback in my WhatsApp app on Gupshup. Then I would get a response as shown in the below screenshot:
- You can use such tools to understand what payload Gupshup sent to your callback URL which you need to accept and handle it in your web service.
3. Once your web-service is scripted and deployed - use tools like Postman to test it by sending a dummy payload similar to what you receive while testing with webhook.site URLs. If your web-service meets all the criteria as mentioned in point #1 you will be able to set the callback URL successfully in the WhatsApp app.
Please try this approach to resolve your issue. If the issue persist, you can write to email@example.com