Messenger error 2018171: Only available to Primary and Secondary Receivers
Last verified against Meta for Developers - Messenger Platform error codes
Only available to Primary and Secondary Receivers.What error 2018171 means
Code 2018171 is a thread-control error from Messenger's handover protocol era: "Only available to Primary and Secondary Receivers." Under that protocol a Page could have one app as the Primary Receiver and others as Secondary Receivers, and the handover endpoints such as pass_thread_control, take_thread_control and request_thread_control were open only to apps holding one of those roles. This error means the calling app held neither.
Meta has since replaced the handover protocol with Conversation Routing. The current guide states that Meta "no longer supports Handover Protocol for Messenger" and that Conversation Routing is backwards compatible with most of the old API. In the new model the Page sets a default application in its Conversation Routing settings, and only that app can take thread control. So when this error appears now, the practical question is how your app is set up for the Page under Conversation Routing.
Sending messages and receiving webhooks may work normally while this fails; only the routing calls are rejected. If the send itself fails because another app controls the thread, that is 2018300.
What it looks like
{
"error": {
"message": "(#2018171) Only available to Primary and Secondary Receivers.",
"type": "OAuthException",
"code": 2018171,
"fbtrace_id": "BLBz/WZt8dN"
}
}Why it happens
- The app is connected to the Page but has no routing role for it.
- Legacy integrations still configured for Primary/Secondary Receiver settings instead of Conversation Routing.
- Calling take_thread_control from an app that is not the Page's default application.
- Using a Page access token generated for one app while calling handover endpoints from another.
How to fix Messenger error 2018171
- 1Open the Page's Conversation Routing settings and check which app is the default application.
- 2Make your app the default application if it should own conversations, or rely on pass_thread_control from the owner if it should not.
- 3Subscribe the app to the messages, messaging_handovers and standby webhook fields.
- 4Confirm the Page access token belongs to the app making the call.
- 5Check thread ownership with GET /PAGE-ID/thread_owner before attempting control calls.
How to stop it recurring
Write down, per Page, which app is the default application and which apps act as helpers, and verify it when onboarding each Page. Use the thread_owner endpoint and messaging_handovers events as the source of truth instead of assumptions. Missing handover webhooks are a common hidden cause; see the webhook debugging guide.
Official reference: Meta for Developers - Messenger Platform error codes. See all Messenger error codes or the Messenger limits and quotas.
Related codes
- 2018300: Another app is controlling this threadMessage failed to send because another app is controlling this thread now.
- 2018234: Secondary receiver cannot see other secondary receiversDenying visibility of any secondary receiver to another secondary receiver…
- 2018321: Thread controlled by Messenger automated flowThe chat is currently controlled by Messenger while the user is in an…
- 10: Application does not have permission for this actionApplication does not have permission for this action
Error 2018171 - quick answers
What does Messenger error 2018171 mean?
Code 2018171 is a thread-control error from Messenger's handover protocol era: "Only available to Primary and Secondary Receivers." Under that protocol a Page could have one app as the Primary Receiver and others as Secondary Receivers, and the handover endpoints such as pass_thread_control , take_thread_control and request_thread_control were open only to apps holding one of those roles.
How do I fix Messenger error 2018171?
1. Open the Page's Conversation Routing settings and check which app is the default application. 2. Make your app the default application if it should own conversations, or rely on pass_thread_control from the owner if it should not. 3. Subscribe the app to the messages, messaging_handovers and standby webhook fields. 4. Confirm the Page access token belongs to the app making the call. 5. Check thread ownership with GET /PAGE-ID/thread_owner before attempting control calls.
Stop debugging Messenger by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.