List a user's chat sessions
GET {{baseUrl}}/chat/users/:userId/sessions?type=1:1&page_size=10&next_page_token=<string>
Retrieves a user's chat sessions. For user-level apps, pass
the
me
value
instead of the
userId
parameter.
Note: For an account-level OAuth app , this API can only be used on behalf of a user who is assigned a role that has the View or Edit permission for Chat Messages .
Scopes:
chat_message:read
,
chat_message:read:admin
Rate Limit Label
:
Medium
Request Params
| Key | Datatype | Required | Description |
| type
| string | | The session queried by the chat type. The API only returns sessions of which the user is a member and of the specified chat type
.
Note:
- If no
type
is provided, response will contain both group and 1:1 chats. | |page_size
| number | | The number of records returned with a single API call. | |next_page_token
| string | | The next page token paginates through a large set of results. A next page token is returned whenever the set of available results exceeds the current page size. This token's expiration period is 15 minutes. |
HEADERS
| Key | Datatype | Required | Description |
| Accept
| string | | |
RESPONSES
status: OK
{"from":"\u003cdateTime\u003e","to":"\u003cdateTime\u003e","next_page_token":"\u003cstring\u003e","page_size":"\u003cinteger\u003e","sessions":[{"channel_id":"\u003cstring\u003e","last_mesage_sent_time":"\u003cdateTime\u003e","name":"\u003cstring\u003e","type":"\u003cstring\u003e","peer_contact_email":"\u003cemail\u003e"},{"channel_id":"\u003cstring\u003e","last_mesage_sent_time":"\u003cdateTime\u003e","name":"\u003cstring\u003e","type":"\u003cstring\u003e","peer_contact_email":"\u003cemail\u003e"}]}