Posts tagged with whatsapp-cloud-api

I have tried ngrok urls. But they are not getting validated.

Then I deployed my code on render.com with the GET and POST request having /webhook endpoint. When I try to configure it, the webhook does get verified ( as per RENDER logs) but still its shows unable to validate the url in meta console.

Servio.net is down.

I created a new app, and did all the required steps; system users added my personal number as a test number for getting messages and verified it. On making a curl call it does say message sent but I did not recieve the message. I read here that I need to initiate the conversation, I added the contact and sent a "Hi", first it was not delivered at all, second,it did not send any message. I am trying to use FlowBridge to integrate Voiceflow but not working. Below is the Hello World curl request:

 curl -i -X POST \   https://graph.facebook.com/v21.0/505794375953552/messages \   -H 'Authorization: Bearer xxxxxxxx' \   -H 'Content-Type: application/json' \   -d '{ "messaging_product": "whatsapp", "to": "+923009290538", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }' HTTP/2 200  content-type: application/json; charset=UTF-8 vary: Origin x-business-use-case-usage: {"476948972175537":[{"type":"whatsapp","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]} access-control-allow-origin: * facebook-api-version: v21.0 strict-transport-security: max-age=15552000; preload pragma: no-cache cache-control: private, no-cache, no-store, must-revalidate expires: Sat, 01 Jan 2000 00:00:00 GMT x-fb-request-id: AzyBpSOlGk337z5dcfK5xz9 x-fb-trace-id: HXfstE61zeT x-fb-rev: 1019058758 x-fb-debug: I+v2luvdeTX0UqrN91y82WqYcDyc5VVff3pfLc+7t1hEjZePGLoQ+M61pCNjx9Kuy1ZuymARjsB3c9eNPBeYKA== content-length: 207 date: Mon, 23 Dec 2024 05:14:56 GMT x-fb-connection-quality: EXCELLENT; q=0.9, rtt=23, rtx=0, c=10, mss=1380, tbw=3394, tp=-1, tpl=-1, uplat=540, ullat=0 alt-svc: h3=":443"; ma=86400 {"messaging_product":"whatsapp","contacts":[{"input":"+923xxx8","wa_id":"xxx"}],"messages":[{"id":"wamid.HBgMOTIzMDA5MjkwNTM4FQIAERgSQkVBMEJGRDAzQzU3NUYwNUIxAA==","message_status":"accepted"}]}%    

Jus to clarify my initial "Hi" message still has a single tick

I have a multi-tenant application where each tenant (client) can manage their products and interact with their customers through WhatsApp. Here’s my setup and the problem I’m facing:

  • I have 70 tenants in my application, and each tenant needs their own WhatsApp bot to communicate with customers.
  • Each bot requires a unique phone number to function.
  • I am using the WhatsApp Business Cloud API and have an account named XYZ.
  • I was able to add two phone numbers to the XYZ account, but I encountered a limitation when trying to add more numbers.
  • Each bot needs to send and receive messages independently, and I also need to process webhook events for each bot separately to handle tenant-specific logic.

Questions:

  1. How can I support 70 tenants, each with a unique phone number and WhatsApp bot, using the WhatsApp Business Cloud API?
  2. Is there a way to overcome the limitation of adding multiple phone numbers to a single WhatsApp Business Account?
  3. How can I set up and handle webhook events efficiently for each tenant in a multi-tenant architecture?

What I’ve Tried:

  • Adding multiple phone numbers to the XYZ account but encountered a limit after two numbers.
  • Researching WhatsApp’s documentation and community forums but couldn’t find a clear solution for this type of multi-tenant setup.

What I Need:

I’m looking for a scalable solution that:

  • Allows each tenant to have their own bot and unique phone number.
  • Ensures webhook events are processed correctly for each tenant, considering their specific logic.

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.