Posts tagged with webhooks

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 trying to subscribe to a webhook for a Facebook Page using my Facebook App, but I'm encountering the following error:

{     "error": {         "message": "(#200) User does not have sufficient administrative permission for this action on this page. If the page business requires Two Factor Authentication, the user also needs to enable Two Factor Authentication.",         "type": "OAuthException",         "code": 200,         "fbtrace_id": "AL8xntMekDRZFSc5PBI8ct8"     } } 

Here’s what I’ve done so far:

  1. I added my Facebook account as a role (Admin) in the Facebook App through the developer dashboard.
  2. Logged into my Facebook account and successfully retrieved the Page Access Token.
  3. Verified that I have full admin access to the Facebook Page.
  4. However, when I try to subscribe to the webhook, I get the error above.

Other details:

  1. Two-Factor Authentication (2FA) enabled for the page or my account.
  2. My Facebook App is in development mode.

What could be causing this issue, and how can I resolve it?

I have this problem with my Meta/Facebook Webhook, It does not allow sending data to my CRM, when I test it the webhook returned me this error "The page admin who installs the app has ceased being an admin".

I don't understand if I have to delete and create a new app (something that I don't want to do) or maybe change this app admin somewhere.

PD: I have role admin, but I didn't create the app, the one how did it is no longer working with us.

PD2: The function that retrieve the data is located in Google Cloud Functions (I don't think this matters for the webhook error)

API set up with Instagram Login.

Seeing the error in the attached screenshot.

  • The callback URL is a Railway.app domain

  • The verify token is a unique code that is self generated.

  • After entering these details, we should see a GET request on our server logs - I do not see anything.

And I receive an error code: The callback URL or verify token couldn't be validated. Please verify the provided information or try again later.

More information: https://developers.facebook.com/community/threads/1460022321208053/?post_id=1460022324541386

we tried this multiple times over different days, and tried different length codes with varying characters.

I have been playing with this now for a week and can't seems to find a solution. Whatsapp Business API is set up and working 100% in Live. I have verified my Webhook but are not able to see any data coming into the webhook file since the verification. Many variations of code have been tried to get data but still I don't see any data on the file, even when testing from the Quickstart > Configuration page.

The code I am currently running is from an answer provided by @Tarik at the following post: (for facebook itself but coding is the same) Facebook Messenger API - Can't verify webhook URL (PHP)

My webhook.php file is:

$message = date('Y-m-d H:i:s'); foreach ($_REQUEST as $key => $value){     $message .= "$key => $value (".$_SERVER['REQUEST_METHOD'].")\n"; } $input = file_get_contents("php://input"); $array = print_r(json_decode($input, true), true); file_put_contents('log.txt', $message.$array."\nREQUEST_METHOD: $_SERVER[REQUEST_METHOD]\n----- Request Date: ".date("d.m.Y H:i:s")." IP: $_SERVER[REMOTE_ADDR] -----\n\n", FILE_APPEND); if ( isset($_REQUEST['hub_challenge']) ){     echo $_REQUEST['hub_challenge']; } 

When sending a test from the Webhook Configuration page, the log.txt file only returns this:

2024-08-08 13:17:38 REQUEST_METHOD: GET ----- Request Date: 08.08.2024 13:17:38 IP: 173.252.107.116 ----- 

I am a bit stuck here and also lost on ideas. Can anyone advise me how to actually read the data I should receive on the webhook? I was considering playing with the verification token to see if Meta require it for some sort of asynchronous communication but that don't seem to be the case. Any assistance will be appreciated.