get https://rtm.imiconnect.io/api/v1/apps/$(appid)/user/$(userid)/threads?start=0
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
Parameter | Type | Mandatory | Description |
---|---|---|---|
appid | String | Yes | Specifies the application ID. |
userid | String | Yes | Specifies the user ID. |
start | Interger | No | Specifies the integer value where the record pointer should start in the app threads. A maximum of 100 threads can be returned (if available). |
Request Headers
The following table describes the request headers:
Request Header | Description |
---|---|
secretKey | Secret key generated in backend application. |
content-type | Application/JSON |
Request Body
The following table describes the elements in the request URL:
Parameter | Type | Mandatory | Description |
---|---|---|---|
appid | String | Yes | Specifies the app ID. |
userid | String | Yes | Specifies the user ID associated with the app. |
##Response Example
{
"total": 1,
"code": "0",
"count": 1,
"messages": [
{
"payload_type": "sentByUser",
"extras": {},
"media": [],
"thread":{
"id" : "UUID",
"type": "conversation",
"externalid": "anything text or number", //optional
"status": "Active/Closed", //need clarification
"title": "Sample title", //optional
"category": "Samplecategory", //optional
"extras": { //optional
"Custom_Param1": "value1",
"Custom_Param2": "value1",
"Custom_Param3": "value1",
"Custom_Param4": "value1",
"Custom_Param10": ["value1","value2"]
},
"stream_name": "Umesh",
"created_on" : "2017-05-03T13:11:47.514Z",
"updated_on" : "2017-05-03T13:11:47.514Z",
}
"message": "Test2",
"userId": "WwopGfVlcgKxbI2egTiT/Q==/Z8WPLM",
"tid": "RDF5856B2-5197-4956-9809-CE68C9A446B9",
"created_on": "2018-04-20T06:18:54.058Z",
"appid": "R209113055",
"read_at": "",
"delivered_at": "",
"status": "submited"
}
],
"description": "success"
}