Pass Thread Control API Reference

To use the Handover Protocol, the Graph API version should be set to 2.6 or greater.

Part of the handover protocol, pass thread control allows you to pass thread control from your app to another app. The app that will receive thread ownership will receive a pass_thread_control webhook event.

Contents

Request URI

To pass thread control, make a POST request to

https://graph.facebook.com/v2.6/me/pass_thread_control?access_token=<PAGE_ACCESS_TOKEN>

Example Request

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

Example Response

{
  "success":true
}

Properties

Property Type Description

recipient

Object

recipient object

recipient.id

Integer

The PSID of the message recipient.

target_app_id

Integer

Required if the Primary Receiver is passing thread control.


The app ID of the Secondary Receiver to pass thread control to.


To pass thread control to the Page inbox, use app ID 263902037430900.

metadata

String

Optional. Metadata passed to the receiving app in the pass_thread_control webhook event.

Error Codes

For error codes see this page.