This API is used to fetch thread message information for a specific threadId under a app and sync all the devices of a specific user.

Request

The app threads request is specified as follows:

Request Body

ParameterTypeMandatoryDescription
appidStringYesSpecifies the application ID.
useridStringYesSpecifies the user ID.
threadidStringYesg
fromStringNoTo fetch thread message information in UTC format, until the specified date. A maximum of 100 messages can be fetched.

Request Headers

The following table describes the request headers:

Request HeaderDescription
secretKeySecret key generated in backend application.
content-typeApplication/JSON

Request Body

The following table describes the elements in the request URL:

ParameterTypeMandatoryDescription
appidStringYesSpecifies the app ID.
useridStringYesSpecifies the user ID associated with the app.
##Response Example
{
 "total" : 2,
 "count" : 2,
 "description" : "success",
 "code" : "0",
 "messages" : [{
   "status" : "read",
   "created_on" : "2017-09-01T11:39:55.257Z",
   "appid" : "BO25162038",
   "payload_type" : "sentToUser",
   "extras" : {
    "fb_psid" : "568021706655423"
   },
   "message" : "It is indeed!",
   "thread" : {
    "id" : "599ff158e4b0369b61ae54ef_0_7cf5a981af4ba80a9275509be45810c64f29bcaf",
    "title" : "437A9206D9B39116208019BA2A58C978",
    "stream_name" : "Foxtons"
   },
   "userId" : "A0D2FE5C5A7880E38FFE51D5B7CA531F",
   "read_at" : "2017-09-01T12:51:52.188Z",
   "delivered_at" : "",
   "tid" : "R82c051a7-dd27-43cc-875b-e86018cef033",
   "media" : []
  }, {
   "status" : "submited",
   "created_on" : "2017-09-01T11:39:43.858Z",
   "appid" : "BO25162038",
   "payload_type" : "sentByUser",
   "extras" : {
    "fb_psid" : "568021706655423"
   },
   "message" : "It's working!",
   "thread" : {
    "id" : "599ff158e4b0369b61ae54ef_0_7cf5a981af4ba80a9275509be45810c64f29bcaf",
    "title" : "437A9206D9B39116208019BA2A58C978",
    "stream_name" : "Foxtons"
   },
   "userId" : "A0D2FE5C5A7880E38FFE51D5B7CA531F",
   "read_at" : "",
   "delivered_at" : "",
   "tid" : "R47bda0cc-1b1c-4ae1-b164-df3442eddd87",
   "media" : []
  }
 ]
}
Language