Method: customEmojis.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出向已通过身份验证的用户显示的自定义表情符号。
自定义表情符号仅适用于 Google Workspace 账号,并且管理员必须为组织启用自定义表情符号。如需了解详情,请参阅了解 Google Chat 中的自定义表情符号和管理自定义表情符号权限。
需要用户身份验证,并具有以下某个授权范围:
https://www.googleapis.com/auth/chat.customemojis.readonly
https://www.googleapis.com/auth/chat.customemojis
HTTP 请求
GET https://chat.googleapis.com/v1/customEmojis
网址采用 gRPC 转码语法。
查询参数
参数 |
pageSize |
integer
可选。返回的自定义表情符号的数量上限。服务返回的自定义表情符号数量可能会少于此值。如果未指定,则默认值为 25。最大值为 200;大于 200 的值会更改为 200。
|
pageToken |
string
可选。(如果从上一个查询继续)。 从上一个列出自定义表情符号的调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,过滤条件值应与提供页面令牌的调用相一致。传递其他值可能会导致意外结果。
|
filter |
string
可选。查询过滤条件。 支持按创作者过滤。 如需按创作者过滤,您必须指定有效的值。目前,只有 creator("users/me") 和 NOT creator("users/me") 支持按自定义表情符号是否由发起通话的用户创建进行过滤。 例如,以下查询会返回调用方创建的自定义表情符号:
creator("users/me")
无效查询会被拒绝并显示 INVALID_ARGUMENT 错误。
|
响应正文
用于列出自定义表情符号的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"customEmojis": [
{
object (CustomEmoji )
}
],
"nextPageToken": string
} |
字段 |
customEmojis[] |
object (CustomEmoji )
无序列表。自定义表情符号列表。
|
nextPageToken |
string
可作为 pageToken 发送的令牌可用于检索下一页结果。如果为空,则表示没有后续页面。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/chat.customemojis
https://www.googleapis.com/auth/chat.customemojis.readonly
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eLists custom emojis visible to the authenticated user, requiring user authentication and specific authorization scopes.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by creator to see emojis created by the calling user or others.\u003c/p\u003e\n"],["\u003cp\u003eSupports pagination to retrieve large lists of custom emojis, with a default page size of 25 and a maximum of 200.\u003c/p\u003e\n"],["\u003cp\u003eReturns a list of custom emojis and a token for retrieving subsequent pages if available.\u003c/p\u003e\n"],["\u003cp\u003eRequires an empty request body and provides a structured JSON response containing emoji details.\u003c/p\u003e\n"]]],["This document details how to list custom emojis in Google Chat via an HTTP GET request to `https://chat.googleapis.com/v1/customEmojis`. The request requires user authentication and supports optional query parameters: `pageSize` (default 25, max 200), `pageToken` (for pagination), and `filter` (to filter by emoji creator). The request body must be empty. The response includes a list of `customEmojis` and an optional `nextPageToken` for pagination. Authorization requires either `chat.customemojis` or `chat.customemojis.readonly` scope.\n"],null,["# Method: customEmojis.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListCustomEmojisResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists custom emojis visible to the authenticated user.\n\nCustom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see [Learn about custom emojis in Google Chat](https://support.google.com/chat/answer/12800149) and [Manage custom emoji permissions](https://support.google.com/a/answer/12850085).\n\nRequires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):\n\n- `https://www.googleapis.com/auth/chat.customemojis.readonly`\n- `https://www.googleapis.com/auth/chat.customemojis`\n\n### HTTP request\n\n`GET https://chat.googleapis.com/v1/customEmojis`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200. |\n| `pageToken` | `string` Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results. |\n| `filter` | `string` Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only `creator(\"users/me\")` and `NOT creator(\"users/me\")` are accepted to filter custom emojis by whether they were created by the calling user or not. For example, the following query returns custom emojis created by the caller: creator(\"users/me\") Invalid queries are rejected with an `INVALID_ARGUMENT` error. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA response to list custom emojis.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"customEmojis\": [ { object (/workspace/chat/api/reference/rest/v1/customEmojis#CustomEmoji) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `customEmojis[]` | `object (`[CustomEmoji](/workspace/chat/api/reference/rest/v1/customEmojis#CustomEmoji)`)` Unordered list. List of custom emojis. |\n| `nextPageToken` | `string` A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.customemojis`\n- `https://www.googleapis.com/auth/chat.customemojis.readonly`\n\nFor more information, see the [Authorization guide](/workspace/chat/authenticate-authorize)."]]