Skip to main content

ChatsService

A list of all methods in the ChatsService service. Click on the method name to view detailed information about that method.

MethodsDescription
list_recent_chats_newReturns recent chats where the user is a member. All records in response are sorted by the lastModifiedTime in descending order (the latest changed chat is displayed first on page)
list_glip_chats_newReturns the list of chats where the user is a member and also public teams that can be joined. All records in response are sorted by creation time of a chat in ascending order. Chat types There are multiple types of chats, including: _ Personal - each user is given a dedicated "personal chat" in which they are the only member. _ Direct - a chat between two individuals. _ Group - a chat between three or more named individuals. A "group" chat has no name. _ Team - a chat related to a specific topic. Members can come and go freely from this chat type. * Everyone - a special chat containing every individual in a company.
read_glip_chat_newReturns information about a chat by ID. Note 'Chat' is a general name for all types of threads including Personal (user's own me-chat), Direct (one on one chat), Group (chat of 3-15 participants without specific name), Team (chat of 2 and more participants, with a specific name), Everyone (company chat including all employees, with a specific name)."
unfavorite_glip_chat_newRemoves the specified chat from the users's list of favorite chats.
favorite_glip_chat_newAdds the specified chat to the users's list of favorite chats.
list_favorite_chats_newReturns a list of the current user's favorite chats.

list_recent_chats_new

Returns recent chats where the user is a member. All records in response are sorted by the lastModifiedTime in descending order (the latest changed chat is displayed first on page)

  • HTTP Method: GET
  • Endpoint: /team-messaging/v1/recent/chats

Parameters

NameTypeRequiredDescription
type_List[ListRecentChatsNewType]Type of chats to be fetched. By default, all chat types are returned
record_countintMax number of chats to be fetched by one request (Not more than 250).

Return Type

TmChatListWithoutNavigation

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)
type_=[
"Everyone"
]

result = sdk.chats.list_recent_chats_new(
type_=type_,
record_count=30
)

print(result)

list_glip_chats_new

Returns the list of chats where the user is a member and also public teams that can be joined. All records in response are sorted by creation time of a chat in ascending order. Chat types There are multiple types of chats, including: _ Personal - each user is given a dedicated "personal chat" in which they are the only member. _ Direct - a chat between two individuals. _ Group - a chat between three or more named individuals. A "group" chat has no name. _ Team - a chat related to a specific topic. Members can come and go freely from this chat type. * Everyone - a special chat containing every individual in a company.

  • HTTP Method: GET
  • Endpoint: /team-messaging/v1/chats

Parameters

NameTypeRequiredDescription
type_List[ListGlipChatsNewType]Type of chats to be fetched. By default, all type of chats will be fetched
record_countintNumber of chats to be fetched by one request. The maximum value is 250, by default - 30.
page_tokenstrPagination token.

Return Type

TmChatList

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)
type_=[
"Personal"
]

result = sdk.chats.list_glip_chats_new(
type_=type_,
record_count=30,
page_token="pageToken"
)

print(result)

read_glip_chat_new

Returns information about a chat by ID. Note 'Chat' is a general name for all types of threads including Personal (user's own me-chat), Direct (one on one chat), Group (chat of 3-15 participants without specific name), Team (chat of 2 and more participants, with a specific name), Everyone (company chat including all employees, with a specific name)."

  • HTTP Method: GET
  • Endpoint: /team-messaging/v1/chats/{chatId}

Parameters

NameTypeRequiredDescription
chat_idstrInternal identifier of a chat. If tilde (~) is specified, then /me (Personal) chat will be returned

Return Type

TmChatInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.chats.read_glip_chat_new(chat_id="chatId")

print(result)

unfavorite_glip_chat_new

Removes the specified chat from the users's list of favorite chats.

  • HTTP Method: POST
  • Endpoint: /team-messaging/v1/chats/{chatId}/unfavorite

Parameters

NameTypeRequiredDescription
chat_idstrInternal identifier of a chat to remove from favorite list.

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.chats.unfavorite_glip_chat_new(chat_id="chatId")

print(result)

favorite_glip_chat_new

Adds the specified chat to the users's list of favorite chats.

  • HTTP Method: POST
  • Endpoint: /team-messaging/v1/chats/{chatId}/favorite

Parameters

NameTypeRequiredDescription
chat_idstrInternal identifier of a chat to add to favorite list.

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.chats.favorite_glip_chat_new(chat_id="chatId")

print(result)

list_favorite_chats_new

Returns a list of the current user's favorite chats.

  • HTTP Method: GET
  • Endpoint: /team-messaging/v1/favorites

Parameters

NameTypeRequiredDescription
record_countintMax number of chats to be fetched by one request (Not more than 250).

Return Type

TmChatListWithoutNavigation

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.chats.list_favorite_chats_new(record_count=30)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →