Posts under category Facebook WhatsApp Business API

I am trying to create a workflow where based on user queries we send some products from the Facebook business catalog to WhatsApp as a single product and list product card as mentioned in the below link: https://developers.facebook.com/docs/whatsapp/guides/commerce-guides/share-products-with-customers

I have created a permanent access token using the system user and I am able to access the catalog and also the products inside the catalog with the access token.

Also using the same token I am able to send normal text and images on whatsapp. Now the issue is when I am trying to send specifically a product as an interactive card, I am getting the below mentioned issue.

{   "error": {     "message": "(#131009) Parameter value is not valid",     "type": "OAuthException",     "code": 131009,     "error_data": {       "messaging_product": "whatsapp",       "details": "Invalid catalog_id."     },     "error_subcode": 2494010,     "fbtrace_id": "AgVHaK1LySusku-_NFpkCNR"   } } 

But the catalog exists and I am also able to access products inside this catalog.

Fetching all the catalogs

Fetching products inside a catalog

Sending Messages as an interactive card for the catalog

I am testing the Single Product Message API endpoint in Whatsapp-Business Cloud.

It is working for some of the products in the catalogue, but for some other products in the same catalogue giving error as 'product not found for product_retailer_id, XX, in catalog_id, XXXXXXXXX'

I can't see any Issue / Policy violations for those products.

This is the Sample Request Payload

{     "messaging_product": "whatsapp",     "recipient_type": "individual",     "to": "XXXX",     "type": "interactive",     "interactive": {         "type": "product",         "body": {             "text": "Hello 111111"         },         "footer": {             "text": "Hello1 1111111"         },         "action": {             "catalog_id": "XXXX",             "product_retailer_id": "XX"         }     }  } 

can you please help me to resolve this issue

I am attempting to use the Meta WhatsApp business API found here: https://developers.facebook.com/docs/whatsapp/cloud-api/overview

Everything has been setup correctly as far as I can tell as I am able to send template messages with my ACCESS_TOKEN and my FROM_PHONE_NUMBER_ID to my mobile using the below:

curl -i -X POST \   https://graph.facebook.com/v14.0/FROM_PHONE_NUMBER_ID/messages \   -H 'Authorization: Bearer ACCESS_TOKEN' \   -H 'Content-Type: application/json' \   -d '{ "messaging_product": "whatsapp", "to": "MY_MOBILE", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }' 

I would now like to send a free form text message by using the example given on the above link. The example is:

curl -X POST \   'https://graph.facebook.com/v14.0/FROM_PHONE_NUMBER_ID/messages' \   -H "Authorization: ACCESS_TOKEN" \   -d '{     "messaging_product": "whatsapp",     "to": "1650XXXXXXX",     "text": {"body" : "hi"}    }' 

I use:

curl -X POST \   'https://graph.facebook.com/v14.0/MY_FROM_PHONE_NUMBER_ID/messages' \   -H "Authorization: ACCESS_TOKEN" \   -d '{     "messaging_product": "whatsapp",     "to": "MY_MOBILE",     "text": {"body" : "hi"}    }' 

This returns a valid message id with no errors however the message is never received.

Some confusing points to note: Why is there no 'Bearer' directive in the ACCESS_TOKEN, it is required for the template call. ( I have tried with and without )? Why does the example show 1650XXXXXX as the mobile number, surely it's just an example but why put the 1650 there in the first place!!! ?