Search code examples
facebook-graph-apifacebook-opengraphwhatsappwhatsapp-cloud-api

Setting WhatsApp Cloud API Callback URL Programmatically


I'm trying to configure the callback URL for the WhatsApp Cloud API programmatically but haven't been able to find the relevant endpoint in the documentation. Currently, I can only set it through the UI in the developer console. Can this configuration be achieved using API calls instead?

want to send a API request which include the callback URL and other parameters and it be configured for Webhooks.


Solution

  • https://developers.facebook.com/docs/graph-api/webhooks/getting-started#configure-webhooks-product says:

    Once your endpoint or sample app is ready, use your app's App Dashboard to add and configure the Webhooks product. You can also do this programmatically by using the /{app-id}/subscriptions endpoint for all Webhooks except Instagram.

    Although I am not really sure what type of object you would need to subscribe to for WhatsApp webhooks - not sure if that goes via the page type?