messaging_handovers
Webhook Event ReferenceThe 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.
For more information on the handover protocol, see Handover Protocol.
pass_thread_control
This callback will occur when thread ownership for a user has been passed to your application.
For details on implementing pass thread control, see 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" } }
sender
Свойство | Тип | Описание |
---|---|---|
| строка | PSID пользователя, который запустил событие Webhook. |
| Строка | user_ref пользователя, который запустил событие Webhook. Доступно только для события Webhook плагина чата. |
recipient
Свойство | Тип | Описание |
---|---|---|
| строка | ID вашей Страницы. |
pass_thread_control
Property | Type | Description |
---|---|---|
| String | App ID that thread control is passed to. |
| String | App ID that thread control is passed from. |
| String | Custom string specified in the API request. |
take_thread_control
This callback will occur when thread ownership for a user has been taken away from your application.
For details on implementing take thread control, see 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" } }
sender
Свойство | Тип | Описание |
---|---|---|
| строка | PSID пользователя, который запустил событие Webhook. |
| Строка | user_ref пользователя, который запустил событие Webhook. Доступно только для события Webhook плагина чата. |
recipient
Свойство | Тип | Описание |
---|---|---|
| строка | ID вашей Страницы. |
take_thread_control
Property | Type | Description |
---|---|---|
| String | App ID that thread control was taken from. |
| String | App ID that thread control was given to. |
| String | Custom string specified in the API request. |
request_thread_control
This callback will be sent to the Primary Receiver app when a Secondary Receiver app calls the Request Thread Control API. The Primary Receiver may then choose to honor the request and pass thread control, or ignore the request.
For details on implementing take thread control, see Take 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"
}
}
sender
Свойство | Тип | Описание |
---|---|---|
| строка | PSID пользователя, который запустил событие Webhook. |
| Строка | user_ref пользователя, который запустил событие Webhook. Доступно только для события Webhook плагина чата. |
recipient
Свойство | Тип | Описание |
---|---|---|
| строка | ID вашей Страницы. |
request_thread_control
Property | Type | Description |
---|---|---|
| String | App ID of the Secondary Receiver that is requesting thread control. |
| String | Custom string specified in the API request. |
app_roles
This callback will occur when a page admin changes the role of your application. An app can be assigned the roles of primary_receiver
or secondary_receiver
.
For information on assigning app roles, see Assign App Roles.
{ "recipient":{ "id":"<PSID>" }, "timestamp":1458692752478, "app_roles":{ "123456789":["primary_receiver"] } }
sender
Свойство | Тип | Описание |
---|---|---|
| строка | PSID пользователя, который запустил событие Webhook. |
| Строка | user_ref пользователя, который запустил событие Webhook. Доступно только для события Webhook плагина чата. |
recipient
Свойство | Тип | Описание |
---|---|---|
| строка | ID вашей Страницы. |
app_roles
Property | Type | Description |
---|---|---|
| String | Your Page ID. |