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

{&quot;from&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;to&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;next_page_token&quot;:&quot;\u003cstring\u003e&quot;,&quot;page_size&quot;:&quot;\u003cinteger\u003e&quot;,&quot;sessions&quot;:[{&quot;channel_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;last_mesage_sent_time&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;peer_contact_email&quot;:&quot;\u003cemail\u003e&quot;},{&quot;channel_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;last_mesage_sent_time&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;\u003cstring\u003e&quot;,&quot;peer_contact_email&quot;:&quot;\u003cemail\u003e&quot;}]}