Degraded Performanceshare-external
meta whatsapp cloud api I have two production numbers. The webhook endpoints for the both are different. When I reply to one number the other webhook also fired. Why?
5

meta whatsapp cloud api I have two production numbers. The webhook endpoints for the both are different. When I reply to one number the other webhook also fired. Why?

ThinkZone
Asked about 3 months ago
Sunny

Facing same issue with multiple apps's webhook

March 22 at 2:54 AM
Piyush

I'm facing same issue. Single business having two apps (two mobile number) and both webhook endpoints are pointed to different urls but When I reply to one number the other webhook also fired.

March 22 at 2:55 AM
Selected Answer
3

I too was facing the issue and have resolved it.

Follow the below article properly and you will be able to unlink one WABA account from the first app. Likewise, unlink the other WABA account from the second app.

Article: https://developers.facebook.com/docs/whatsapp/embedded-signup/webhooks

Pro Tip: In the API endpoint enter the "temporary" token of the APP for authorization and this will ensure that you unlink the WABA account mentioned in your request with the app which has that particular temporary token.

March 27 at 7:01 AM
Rupesh
Selected Answer
1

Confirmed, it worked perfectly for me, thank you very much! I followed the mentioned article: https://developers.facebook.com/docs/whatsapp/embedded-signup/webhooks

*I used ChatGPT for translation

If you want to receive an individual Webhook response for each APP without needing to create a new business, follow the article above.

In my case, I needed an individual Webhook for 3 numbers.

In summary, I did the following:

I checked which Webhook subscriptions existed for each of my WhatsApp Business numbers. - For this, I made this request 3 times, changing the ID_WHATSAPP_BUSINESS:

: GET```

URL:```

://graph.facebook.com/{{VERSION}}/{{ID_WHATSAPP_BUSINESS}}/subscribed_apps```

Headers: Bearer {{TOKEN_SUPREME or TOKEN_TEMPORARY_ANY_APP}}```

After checking which Webhook subscriptions existed for each WhatsApp Business number, I cleared all Webhook subscriptions for all my WhatsApp Business numbers. - For this, I made this request 3 times, changing the ID_WHATSAPP_BUSINESS:

: DELETE```

URL:```

://graph.facebook.com/{{VERSION}}/{{ID_WHATSAPP_BUSINESS}}/subscribed_apps```

Headers: Bearer {{TOKEN_SUPREME}}```

The TOKEN_SUPREME, which is a token with higher level access, was able to delete all Webhook subscriptions at once, but it's also possible to repeat the request several times by changing the token to a temporary token for each APP. This way, it's possible to delete all subscriptions for the WhatsApp Business number.

After deleting all Webhook subscriptions for all WhatsApp Business numbers, I individually added the Webhook subscription for an APP to the WhatsApp Business numbers I desired. - For this, I made this request 3 times, changing the ID_WHATSAPP_BUSINESS_DESIRED:

: POST```

URL:```

://graph.facebook.com/{{VERSION}}/{{ID_WHATSAPP_BUSINESS_DESIRED}}/subscribed_apps```

Headers: Bearer {{TEMPORARY_TOKEN_DESIRED_APP}}```

To confirm if each WhatsApp Business number had the correct APP Webhook subscription, I checked the subscriptions for each number, as before. - For this, I made this request 3 times, changing the ID_WHATSAPP_BUSINESS:

: GET```

URL:```

://graph.facebook.com/{{VERSION}}/{{ID_WHATSAPP_BUSINESS}}/subscribed_apps```

Headers: Bearer {{TOKEN_SUPREME or TOKEN_TEMPORARY_ANY_APP}}```

Expected result for each WhatsApp Business number:

{
    "data": [
        {
            "whatsapp_business_api_data": {
                "link": "https://www.facebook.com/games/?app_id=ID_APP",
                "name": "NAME_APP",
                "id": "ID_APP"
            }
        }
    ]
}

I followed these steps to add different Webhook subscriptions for each WhatsApp Business number.

April 11 at 9:48 AM
Rafael