Interrupción parcialshare-external
Error when subscribing to Whatsapp webhook
2

Hi! I'm developing a messaging solution, where I will manage my customers' Whatsapp communications. To achieve that, I'm using Facebook Login to get an access token. With that token, I'm able to fetch bussinesses data, as well as Whatsapp Bussiness Accounts related to those bussinesses, and info of each number.

However, when I try to subscribe an account to a webhook, I get the following error:

{ "error": { "message": "Application does not have permission for this action", "type": "OAuthException", "code": 10, "error_subcode": 2388097, "is_transient": false, "error_user_title": "App no vinculada a un negocio", "error_user_msg": "Tu app no está vinculada a un negocio o el negocio no tiene acceso a la cuenta de WhatsApp Business. Ve a la configuración del negocio de Meta: en la pestaña \"Apps\" en \"Cuenta\", haz clic en \"Agregar\" y selecciona \"Conectar un identificador de la app\" para vincular tu app con el negocio.", "fbtrace_id": "Auc1CZ4kPVzdG2BwWD-CdWF" } }

This is the URL I'm sending the POST request to:

https://graph.facebook.com/v16.0/103926569352137/subscribed_apps?subscribed_fields=messages

Being 103926569352137 the WABA id that I'm trying to subscribe. When I enter bussiness management page, I can see my app linked to this account. The app id is 777405927224344. It's still a test app, since I'm getting ready to send it to review.

I've already revised this post https://developers.facebook.com/support/bugs/247900947738603/?join_id=fb950c39f9f72272c, but I can already see the app linked.

When I use the debug_token endpoint, I can see the following:

{ "data": { "app_id": "777405927224344", "type": "USER", "application": "Dupin Dev", "data_access_expires_at": 1727216313, "expires_at": 0, "is_valid": true, "issued_at": 1719440314, "scopes": [ "email", "pages_show_list", "business_management", "pages_messaging", "instagram_basic", "whatsapp_business_management", "instagram_manage_messages", "pages_manage_metadata", "whatsapp_business_messaging", "public_profile" ], "granular_scopes": [ { "scope": "pages_show_list", "target_ids": [ "113861868237915" ] }, { "scope": "business_management", "target_ids": [ "1001969807901779", "239264988767000" ] }, { "scope": "pages_messaging", "target_ids": [ "113861868237915" ] }, { "scope": "instagram_basic", "target_ids": [ "17841457670809719" ] }, { "scope": "whatsapp_business_management", "target_ids": [ "103926569352137" ] }, { "scope": "instagram_manage_messages", "target_ids": [ "17841457670809719" ] }, { "scope": "pages_manage_metadata", "target_ids": [ "113861868237915" ] }, { "scope": "whatsapp_business_messaging", "target_ids": [ "103926569352137" ] } ], "user_id": "249417978190936" } }

Can anyone tell me what I'm missing? I'm running out of ideas.

Ignacio
Enviada hace 5 meses aproximadamente
Respuesta seleccionada
1

Hi everyone. After looking into this issue with direct support, we found different scenarios where you can get this error, and have nothing to do with app business linking or something like that.

First, we were getting this error because our phone number was managed by a BSP.

We created another WABA and this error was still present, so we were told that this time the issue was because the WABA we were using is tagged as 'SMB'.

tldr; if you get this error, ask direct support. Many different issues can cause it, and the error code and message will always be the same.

15 de julio a las 9:01
Ignacio
Respuesta seleccionada
1

If you've got a Business (business.facebook.com), you'll need to add your application 777405927224344 to be owned by that business.

27 de junio a las 11:41
Sherman
Ignacio

When I go into the app manager, I already see this app as mine.

Also, this will give me trouble later when I want to subscribe my customer's wabas to my webhook. I can't make them own my app. Isn't embedded signup supposed to allow this?

27 de junio a las 12:06
Sherman

Yes app manager will show you that the app is yours, but the issue is that the app needs to be owned by a business, not an individual.

Visit business.facebook.com to see if you have an existing business to add your application ownership under (otherwise, create one).

27 de junio a las 23:31
Sherman

I guess that is pretty much what the support folks said in that ticket you linked - you need to have the app linked to a business.

27 de junio a las 23:32