When publishing a Flow, you may encounter the following error:
Publishing without specifying endpoint_uri is forbidden
This error occurs when the endpoint_uri property is missing from your Flow JSON. In Flow JSON version 3.0 and above, this field must be set via the API before publishing.
How to Fix the Error?
Step 1: Check Your Flow JSON Version
If your Flow JSON version is below 3.0, use data_channel_uri instead of endpoint_uri.
If your Flow JSON version is 3.0 or above, ensure endpoint_uri is set using the API.
Step 2: Set endpoint_uri via API
For Flow JSON version 3.0 and above, you need to set endpoint_uri using an API request before publishing.
Sample API Request:
curl -X PATCH '{BASE-URL}/{FLOW-ID}' \
--header 'Authorization: Bearer {ACCESS-TOKEN}' \
--header 'Content-Type: application/json' \
--data '{ "endpoint_uri": "https://api.example.com/webhook" }'
Step 3: Save and Publish the Flow
After setting the endpoint_uri, save the Flow.
Validate the Flow using the Flow Builder UI or API.
Once validation passes, proceed with publishing.
For more troubleshooting tips related to WhatsApp Business API, check out heltar.com/blogs.