https://xxxxxx/v4/recentcontact/get_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
xxxxxx | Domain name corresponding to the country/region where your SDKAppID is located. China: console.tim.qq.comSingapore: adminapisgp.im.qcloud.comSeoul: adminapikr.im.qcloud.comFrankfurt: adminapiger.im.qcloud.comTokyo: adminapijpn.im.qcloud.comSilicon Valley: adminapiusa.im.qcloud.comJakarta: adminapiidn.im.qcloud.com |
v4/recentcontact/get_list | Request API. |
sdkappid | SDKAppID assigned by the Chat console when an app is created. |
identifier | |
usersig | |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295. |
contenttype | Request format, which should always be json. |
{"From_Account": "user_0001","TimeStamp": 0,"StartIndex": 0,"TopTimeStamp": 0,"TopStartIndex": 0,"AssistFlags": 63}
Field | Type | Required | Description |
From_Account | String | Yes | UserID of the account for which to pull a conversation list. |
TimeStamp | Integer | Yes | Start time of general conversations. Enter 0 for the first page. |
StartIndex | Integer | Yes | Starting point of general conversations. Enter 0 for the first page. |
TopTimeStamp | Integer | Yes | Start time of pinned conversations. Enter 0 for the first page. |
TopStartIndex | Integer | Yes | Starting point of pinned conversations. Enter 0 for the first page. |
AssistFlags | Integer | Yes | Flag bits of conversations: Currently, set this value to 63 to retrieve complete conversation data. It is not recommended to change this setting. |
{"SessionItem": [{"Type": 1,"To_Account": "user_0002","MsgTime": 1772612017,"TopFlag": 0},{"Type": 2,"GroupId": "@TGS#1B2AUI7RZ","MsgTime": 1775185968,"TopFlag": 0,"StandardMark": "111001","CustomMark": "abcd","ContactGroupId": [1,2]},{"Type": 1,"To_Account": "user_0003","MsgTime": 1772605020,"TopFlag": 1,"StandardMark": "111001","CustomMark": "abcd","ContactGroupId": [1]}],"CompleteFlag": 1,"TimeStamp": 1775552160,"StartIndex": 0,"TopTimeStamp": 1775552160,"TopStartIndex": 0,"GroupItem": [{"GroupName": "group_0001","GroupId": 1},{"GroupName": "group_0002","GroupId": 2}],"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": ""}
Field | Type | Description |
SessionItem | Array | Array of conversation objects. |
Type | Integer | Conversation type: 1: One-to-one conversation. 2: Group conversation. |
To_Account | String | UserID of the other conversation participant, which will be returned only for a one-to-one conversation. |
GroupId | String | Group ID, which will be returned only for a group conversation. |
MsgTime | Integer | Conversation duration. |
TopFlag | Integer | Flag of conversation pinning: 0: General conversation. 1: Pinned conversation. |
StandardMark | String | Standard mark capability bit, for example, 011111110. |
CustomMark | String | Custom mark. |
ContactGroupId | Array | Group to which the conversation belongs. |
CompleteFlag | Integer | Completion flag: 0: Pulling has not finished yet. 1: All conversation are returned. |
TimeStamp | Integer | Start time of the next pulled page for a general conversation, which is sent to the Chat backend via the TimeStamp field of the request during pulling-by-page. |
StartIndex | Integer | Starting point of the next pulled page for a general conversation, which is sent to the Chat backend via the StartIndex field of the request during pulling-by-page. |
TopTimeStamp | Integer | Start time of the next pulled page for a pinned conversation, which is sent to the Chat backend via the TopTimeStamp field of the request during pulling-by-page. |
TopStartIndex | Integer | Starting point of the next pulled page for a pinned conversation, which is sent to the Chat backend via the TopStartIndex field of the request during pulling-by-page. |
GroupItem | Array | Conversation group object. |
GroupName | String | Conversation group name. |
GroupId | Integer | Conversation group ID. |
ActionStatus | String | The request result. OK: successful. FAIL: failed. |
ErrorCode | Integer | |
ErrorInfo | String | Detailed error message. |
ErrorCode, and ErrorInfo.
For public error codes (60000 to 79999), see Error Codes.
The following table describes the error codes specific to this API:Error Code | Description |
50001 | The requested UserID has not been imported to Chat. Please import the UserID first. |
50002 | Incorrect request parameter. Check your request according to the error description. |
50003 | The request requires app admin permissions. |
50004 | Internal server error. Please try again. |
50005 | Network timeout. Try again later. |
フィードバック