Jump to: navigation, search

SendToAgents

This operation is part of the Facebook Private Messaging API section of the Web Services API.

Overview

This request sends a text message only to agents who are in a conference or in a consulting Facebook chat.

Request URL /api/v2/me/facebooksessions/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName SendToAgents
text The text to send to agents

Sample

Request

POST api/v2/me/facebooksessions/0071023821aec011
{
  "operationName": "SendToAgents",
  "text": "We need your help?"
}

Response

{
  "statusCode": 0
}

Notification

Here is the list of notifications received after sending a new message only for agents:

Notification with new message

{
       "facebooksessionUri": "http: //192.168.83.25: 8090/api/v2/facebooksessions/0002EaAY01MT007J",
       "messages": [
           {
               "index": 5,
               "from": {
                   "participantId": "007356276D330155",
                   "type": "Agent",
                   "uri": "http: //192.168.83.25: 8090/api/v2/users/5e101708f14442c7ab79814bb4f799b2",
                   "visibility": "All",
                   "path": "/users/5e101708f14442c7ab79814bb4f799b2",
                   "nickname": "TestName",
                   "id": "007356276D330155"
               },
               "text": "Helloagentslave",
               "visibility": "Agents",
               "timestamp": "2015-10-2113: 48: 16.000+0300",
               "type": "Text",
               "timestampSeconds": 1445424496000L
           }
       ],
       "facebooksessionPath": "/facebooksessions/0002EaAY01MT007J",
       "messageType": "MessageLogUpdated",
       "notificationType": "NewMessages"
   },
   "channel": "/v2/me/facebooksession"
}
This page was last edited on October 31, 2023, at 13:29.
Comments or questions about this documentation? Contact us for support!