I'm trying to send a flow but I'm always getting that the object id doesn't esxist (the phone number).
curl --location 'https://graph.facebook.com/v18.0/5731.../messages' \ --header 'Authorization: Bearer EAA...' \ --header 'Content-Type: application/json' \ --data '{ "recipient_type": "individual", "messaging_product": "whatsapp", "to": "5841..", "type": "interactive", "interactive": { "type": "flow", "header": { "type": "text", "text": "Flow message header" }, "body": { "text": "Flow message body" }, "footer": { "text": "Flow message footer" }, "action": { "name": "flow", "parameters": { "flow_message_version": "3", "flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.", "flow_id": "1211462153575982", "flow_cta": "Book!", "flow_action": "data_exchange" } } } }'
Any guess what i'm doing wrong?
Send the flow........................................
1. Verify permissions
This looks like a permission error, it seems the account you used to generate the token does not have permission to this number
5731...
. You can check your permissions here (replace waba & business id)https://business.facebook.com/settings/whatsapp-business-accounts/{waba-id}?business_id={business-id}
To create and send flows you need these permissions "Message templates (view and manage)" & "Phone Numbers (view and manage)"
2. Verify the request
The field
"flow_action": "data_exchange"
should only be used if your flow uses an endpoint. If you flow doesn't have and endpoint then the action and payload should be like thisYou can also check the example request in the postman collection here