Posts tagged with facebook-messenger-bot

I am currently developing a application that interacts with the Messenger API. Everything was working as expected until I submitted my app for a permissions review to Meta for the pages_messaging permission. After Meta’s review team tested the app by sending messages to the associated Facebook Page, the Messenger functionality for that Page stopped working entirely.

Here is what happens:

When I use the Access Token to make a request to me?, the response is successful, and I can retrieve basic Page information. However, when I try to query Messenger conversations using the /PAGE_ID/conversations endpoint, the following error is returned:

{   "error": {     "message": "An unexpected error has occurred. Please retry your request later.",     "type": "OAuthException",     "is_transient": true,     "code": 2,     "fbtrace_id": "AX_i_atlXLLuT2YAz5tkvl6"   } } 

Additional Observations: The issue occurs only for the Page tested by Meta's review team. Other Pages linked to the same application work without issues. The Access Token is valid and includes the necessary permissions (pages_messaging and pages_read_engagement). According to Meta Status, there are no ongoing disruptions for the Messenger API. The error is marked as is_transient: true, but retrying multiple times over hours/days still produces the same error. I have reviewed the Page's settings and permissions, and everything seems configured correctly.

Questions: What could cause the Messenger API to stop working specifically for a Page after Meta's review process? Is there any action I need to take to resolve this issue, such as resetting permissions, reassigning roles, or contacting Meta support? Could this issue be related to the permissions granted during the review process? If so, how can I verify this? How should I approach debugging this error further? For instance, is there a way to trace the problem using the provided fbtrace_id?

Any insights or guidance would be greatly appreciated!

I used the Access Token to call the Messenger API multiple times for the /PAGE_ID/conversations endpoint. I also verified that the Access Token has the required permissions (pages_messaging and pages_read_engagement) using the Graph API Explorer. I tested the /me endpoint with the same token, and it returned the expected Page data, confirming the token is valid.

I expected to receive a list of conversations for the Page, as it works correctly for other Pages linked to the same app. The Access Token should function properly because it is newly generated and has all the required permissions.

Instead of the expected response, the API returned the following error: json

{   "error": {     "message": "An unexpected error has occurred. Please retry your request later.",     "type": "OAuthException",     "is_transient": true,     "code": 2,     "fbtrace_id": "AX_i_atlXLLuT2YAz5tkvl6"   } } 

Additional Details:

This error happens only with the Page that was tested during the permissions review by Meta’s review team. Other Pages linked to the same application are working as expected and do not encounter this issue.

I am trying to set up a facebook messenger chatbot using dialogflow, and when I am trying to integrate both the services, I get this error message

com.google.dialogflow.bots.common.exceptions.BotWasNotStartedException: Code 400: (#100) You must set a Get Started button if you also wish to use persistent menu.

I tried the method referred in this question : get started button for fb messenger in dialog flow (get started button for fb messenger in dialog flow)

but it threw the error when I tried sending a POST request as given in the answer : "error": {"message": "(#100) Requires one of the params: get_started,persistent_menu,target_audience,whitelisted_domains,greeting,account_linking_url,payment_settings,home_url,ice_breakers,platform,title,description,commands", What do I do and how do I proceed from here? Is there a PHP or a JSON code that I must integrate? Or is there something else I can do about it?

Error message in dialogflow while trying to integrate messenger and dialogflow : com.google.dialogflow.bots.common.exceptions.BotWasNotStartedException: Code 400: (#100) You must set a Get Started button if you also wish to use persistent menu.

Error message while trying to send a POST request to set a Get Started button : "error": {"message": "(#100) Requires one of the params: get_started,persistent_menu,target_audience,whitelisted_domains,greeting,account_linking_url,payment_settings,home_url,ice_breakers,platform,title,description,commands",

I'm encountering a problem with the transition from Facebook's Handover Protocol to the new Conversation Routing system. Previously, under the Handover Protocol, once the primary app (e.g., a chatbot) responded to a user query, the conversation would automatically move to the 'Done' directory. However, with the recent shift to Conversation Routing, this behaviour has changed. All conversations remain in the Main directory even though the default app has already replied to the user. This is causing difficulties for real agents using the Meta Business Inbox feature, as it's not clear whether a conversation is actively being handled by the bot or has been transferred to the Inbox app.

Current configuration: In my facebook page > Settings > Page Setup > Messenger Conversation Routing> Default App is set to my chatbot app In Page Setup > Advanced Messaging, I've tried both leaving the 'Primary Receiver for Handover Protocol' field empty and setting my app as the primary receiver I also noted that once you setup a default app for Conversation Routing, you can't remove it anymore.

Question: How can I ensure that conversations handled by the bot are marked as 'Done' once responded to, to maintain clarity for the agents in the Meta Inbox? Any advice or solutions would be greatly appreciated.

I'm facing an issue with the Facebook Conversation Routing as described in their documentation. According to the documentation, if a page agent responds to a message in a conversation not currently controlled by the inbox, the inbox should take control of the conversation. However, this is not happening in my case. documentation

Note: Although it doesn't work for Facebook conversation, it does work for Instagram conversations (i.e. the instagram conversation is assigned to the Inbox if replied through the Inbox app)

Current configuration: In my facebook page > Settings > Page Setup > Messenger Conversation Routing> Default App is set to my chatbot app In Page Setup > Advanced Messaging, I've tried both leaving the 'Primary Receiver for Handover Protocol' field empty and setting my app as the primary receiver

Steps to reproduce the issue:

A user sends a message to our Facebook page. The chatbot, which initially controls the conversation, receives and responds the message. I then respond to the message directly through the Inbox (https://business.facebook.com/latest/inbox/). Expected behaviour: According to the documentation, once I respond through the Inbox, control of the conversation should transfer from the chatbot app to the Inbox.

Actual behaviour: Despite responding through the Inbox, the conversation remains assigned to the chatbot app. Therefore if the user responds my chatbot is triggered. I also confirmed this by calling the thread_owner endpoint, which still shows the chatbot as the owner.

Troubleshooting steps taken:

Double-checked the app and page settings to ensure they align with the expected routing behaviour. I can confirm since Conversation Routing is enabled, I do not receive message_handover webhooks once the conversation is closed. I believe this is expected behaviour as also noted in the documentation documentation

Question: Has anyone else encountered this issue? Are there specific settings or conditions that might prevent the expected transfer of conversation control from the chatbot to the Inbox? Any insights or suggestions on how to resolve this would be greatly appreciated.

I am using the WhatsApp Business API to use my chatbot and I needed to connect the Facebook product catalog to the configured WhatsApp number. Does anyone know what I can do to associate a catalog with a WhatsApp account and if it is possible to use the catalog response in the WhatsApp API for consumption? I'm developing a chatbot for restaurants and I wanted the user to be able to place an order through the WhatsApp Business catalog and from there the chatbot would get the rest of the information. I already have a catalog set up and a working WhatsApp number, however, when I associate the menu with the registered phone number, the catalog does not appear on the WhatsApp profile of the registered number.