Posts under category Facebook WhatsApp Business API

I'm trying to make a GET request to the Facebook Graph API to fetch analytics for a WhatsApp Business Account using Postman. The request is structured as follows:

https://graph.facebook.com/v21.0/{whatsapp-business-account-ID}?fields=analytics.start(1732672800).end(1732932000).granularity(DAY)&access_token={access-token} 

What I've Tried: Set the request type to GET. Added all the required query parameters (fields, start_time, end_time, granularity, access_token) in Postman. Checked that the access_token is valid with the right permissions (whatsapp_business_management). Problem: When I send the request, I get an error response:

json Copy code

{     "error": {         "message": "(#100) Tried accessing nonexisting field (analytics) on node type (WhatsAppBusinessPhoneNumber)",         "type": "OAuthException",         "code": 100,         "fbtrace_id": "XXXXXXXXXXXX"     } } 

What I Need:

Clarification on whether analytics is a valid field for a WhatsApp Business Account. How to set up this request correctly in Postman or any potential troubleshooting steps. Any additional permissions or API version considerations to make this work.

Additional Details:

Access token: Valid and has whatsapp_business_management permission. API version: v21.0 (can switch to another version if necessary). End goal: Retrieve analytics for a specific date range with daily granularity.

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); }); 

When trying to generate a token for use of the application linked to the official WhatsApp account, for the business with ID 1721604661267440, we are not getting the token returned at the end of the process.
Step-by-step video available at: https://m.topsay.com.br/Token_Richet_Meta.mp4
When clicking on the last GENERATE TOKEN button, where the banner closes without displaying any other content, when inspecting the browser log, the following json is obtained in the return of the requested route:
=================== { "data": { "xfb_system_user_token_generation": null }, "errors": [ { "message": "A server error field_exception occured. Check server logs for details.", "severity": "CRITICAL", "mids": [ "f3c1ffc75d7fb83c3e63c12028eca40f" ], "code": 1349045, "api_error_code": null, "summary": "An invalid Platform session was found.", "description": "An invalid Platform session was found.", "description_raw": "An invalid Platform session was found.", "is_silent": true, "is_transient": false, "is_not_critical": false, "requires_reauth": false, "allow_user_retry": false, "debug_info": null, "query_path": null, "fbtrace_id": "GbdkVezAOhX", "www_request_id": "AGhNDifZUu_oD-NnHQWMXYY", "path": [ "xfb_system_user_token_generation" ] } ], "extensions": { "is_final": true }
}

We created a WhatsApp Business Account (WABA) on our demo environment and everything works as expected. We then disconnected that WABA from demo and connected it on prod which has a different webhook url. No webhook events are being sent after switching which facebook app we connect with.
We then tried creating a fresh WABA on our facebook business (new number) via the whats app embedded signup flow (on prod) and we are still not receiving webhooks.
How are we supposed to connect a WABA to our production (live) app for use in the app review when we don't receive webhooks for incoming messages? What piece are we missing?