Take Thread Control

Take Thread Control API allows the app with the Primary Receiver role to take control of the conversation from the Secondary Receiver app. This is useful if it takes too long for the Secondary Receiver to respond or it becomes unresponsive. An optional metadata string may also be sent in the request.

The Secondary Receiver app will receive a messaging_handovers webhook event when control of the conversation has been taken away. The event will contain the metadata string.

Example Request

For complete API details and request properties, see the Take Thread Control Reference.

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{"id":"<PSID>"},
  "metadata":"String to pass to the secondary receiver" 
}' "https://graph.facebook.com/v2.6/me/take_thread_control?access_token=<PAGE_ACCESS_TOKEN>"

Example messaging_handovers Event

{
  "sender":{
    "id":"<USER_ID>"
  },
  "recipient":{
    "id":"<PSID>"
  },
  "timestamp":1458692752478,
  "take_thread_control":{
    "previous_owner_app_id":"123456789",
    "metadata":"additional content that the caller wants to set"
  }
}