messaging_handovers webhook event is used to notify your webhook when certain actions are taken using the Messenger Platform’s handover protocol, including pass thread control, take thread control, and role change events.pass_thread_control{
"sender":{
"id":"<PSID>"
},
"recipient":{
"id":"<PAGE_ID>"
},
"timestamp":1458692752478,
"pass_thread_control":{
"previous_owner_app_id":"<previous_app_id or null (idle_mode)>",
"new_owner_app_id":"123456789",
"metadata":"Additional content that the caller wants to set"
}
}
sendersender Field
| Description |
|---|---|
id string | The Page-scoped ID for the person who sent a message to your business |
recipientrecipient Field
| Description |
|---|---|
id string | The ID for your Facebook Page |
pass_thread_control| Property | Type | Description |
|---|---|---|
new_owner_app_id | String | App ID that thread control is passed to. |
previous_owner_app_id | String | App ID that thread control is passed from. |
metadata | String | Custom string specified in the API request. |
take_thread_control{
"sender":{
"id":"<PSID>"
},
"recipient":{
"id":"<PAGE_ID>"
},
"timestamp":1458692752478,
"take_thread_control":{
"previous_owner_app_id":"123456789", //could be null if thread was in idle mode
"new_owner_app_id": <new_app_id>,
"metadata":"additional content that the caller wants to set"
}
}
sendersender Field
| Description |
|---|---|
id string | The Page-scoped ID for the person who sent a message to your business |
recipientrecipient Field
| Description |
|---|---|
id string | The ID for your Facebook Page |
take_thread_control| Property | Type | Description |
|---|---|---|
previous_owner_app_id | String | App ID that thread control was taken from. |
new_owner_app_id | String | App ID that thread control was given to. |
metadata | String | Custom string specified in the API request. |
request_thread_control{
"sender":{
"id":"<USER_ID>"
},
"recipient":{
"id":"<PSID>"
},
"timestamp":1458692752478,
"request_thread_control":{
"requested_owner_app_id":123456789,
"metadata":"additional content that the caller wants to set"
}
}
sendersender Field
| Description |
|---|---|
id string | The Page-scoped ID for the person who sent a message to your business |
recipientrecipient Field
| Description |
|---|---|
id string | The ID for your Facebook Page |
request_thread_control| Property | Type | Description |
|---|---|---|
requested_owner_app_id | String | App ID of the Secondary Receiver that is requesting thread control. |
metadata | String | Custom string specified in the API request. |
app_rolesprimary_receiver or secondary_receiver.{
"recipient":{
"id":"<PSID>"
},
"timestamp":1458692752478,
"app_roles":{
"123456789":["primary_receiver"]
}
}
sendersender Field
| Description |
|---|---|
id string | The Page-scoped ID for the person who sent a message to your business |
recipientrecipient Field
| Description |
|---|---|
id string | The ID for your Facebook Page |
app_roles| Property | Type | Description |
|---|---|---|
id | String | Your Page ID. |