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 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.me
value instead of the userId
parameter.
Scopes: chat_message:read
, chat_message:read:admin
Rate Limit Label: Medium
Body
PARAM
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": "<dateTime>",
"to": "<dateTime>",
"next_page_token": "<string>",
"page_size": "<integer>",
"sessions": [
{
"channel_id": "<string>",
"last_mesage_sent_time": "<dateTime>",
"name": "<string>",
"type": "<string>",
"peer_contact_email": "<email>"
},
{
"channel_id": "<string>",
"last_mesage_sent_time": "<dateTime>",
"name": "<string>",
"type": "<string>",
"peer_contact_email": "<email>"
}
]
} |
ENDPOINTS