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。
|
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
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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)."]]