Posts tagged with whatsapp-cloud-api

I'm experiencing an issue with WhatsApp webhook messages events not being triggered, despite other webhook tests working correctly (like flows \ security \ account_alerts.

Environment:

  • Using WhatsApp Business API
  • Tested on Facebook's webhook test page
  • Facebook app in Live mode

Problem Details:

  • All webhook tests received successfully EXCEPT message webhooks
  • No webhooks are triggered when:
    1. Sending messages from the Facebook webhook test page
    2. Sending messages directly to the registered WhatsApp number

Code/Configuration Attempts:

// Simplified webhook handler (example) app.post('/webhook', (req, res) => {   const body = req.body;   console.log('Webhook received:', body);      if (body.entry && body.entry[0].changes) {     // Webhook processing logic   }      res.sendStatus(200); }); 

I'm working on sending WhatsApp messages through the Meta (Facebook) Graph API using the following endpoint:

https://graph.facebook.com/v21.0/${{phoneNumber-id}}/messages 

Here is the body

{   "messaging_product": "whatsapp",   "to": "",   "type": "template",   "template": {     "name": "hello_world",     "language": {       "code": "en_US"     }   } } 

However, when I hit the API, I receive the following error response:

{     "error": {         "message": "Unsupported post request. Object with ID '${{phoneNumber-id}}' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",         "type": "GraphMethodException",         "code": 100,         "error_subcode": 33,         "fbtrace_id": "Ap51V1Qjcw1Vh8LJ4aeP0Fm"     } } 

I am using test number provieded by facebook to send messages, I’ve verified my access token and permissions but still encounter this error.

What could be causing this issue? Are there any specific permissions or configurations I might be missing, or is there something wrong with how I’m referencing ${{phoneNumber-id}} in the endpoint? Any help or insights with the WhatsApp API would be greatly appreciated.

'm currently working with the WhatsApp Business API and facing an issue specifically with the "messages" webhook. For some reason, this webhook isn't being triggered, even when I test it manually from the WhatsApp Business dashboard.

Here are the details:

All other webhooks (e.g., status, message_template, etc.) are working perfectly fine. I've tried reconfiguring the webhook URL multiple times. I switched the app back to development mode to see if that would fix it, but no luck. Has anyone encountered a similar issue or have any ideas on how to resolve this?

Additional Information:

I've verified that the server is publicly accessible and can receive POST requests. There are no errors or logs indicating any incoming request for the "messages" webhook on my server. Any help or suggestions would be greatly appreciated!

I've developed a cloud service (Google cloud Run job) with a webapp that responds to messages as if the replies were from me. When triggered, it reads all my emails and writes a draft as an answer. However, I want to integrate it also with WhatsApp.

I read that I can create an endpoint with the business cloud api so that the software can receive my whatsapp messages, but I realised that I can't save messages as draft with the current API. Indeed, I want to save a response generated by my service as a draft in WhatsApp, so when I open WhatsApp, the message is already there under the intended contact.

I've discovered that the "click to chat" functionality (e.g., https://wa.me/myfriendnumber?=hi) partially achieves this.

However, when I open such a link, it launches my browser first, which then prompts me to open the WhatsApp app. I'd like to bypass this manual step, avoiding the "Open in WhatsApp" confirmation popup, so that I can open multiple links programmatically and have the messages saved as drafts in WhatsApp directly.

Is there a way to automate this, or another method to achieve the same result?

My app sends booking reminders using the WhatsApp Cloud API. Everything works as expected with the test number. I added the company number and verified it with the SMS code. In the WhatsApp Manager, the status of the number is "waiting," and it says that I need to associate the certificate with the number. I have the certificate and tried to follow the documentation linked near the certificate. However, it leads me to the on-premises documentation, which is not relevant for the Cloud API. Can you please help me figure out what I am missing?

The Cloud API has nothing on certificate association.