Method: customEmojis.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Yêu cầu HTTP
GET https://chat.googleapis.com/v1/customEmojis
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số truy vấn
Thông số |
pageSize |
integer
Không bắt buộc. Số lượng biểu tượng cảm xúc tuỳ chỉnh tối đa được trả về. Dịch vụ có thể trả về ít biểu tượng cảm xúc tuỳ chỉnh hơn giá trị này. Nếu không được chỉ định, giá trị mặc định sẽ là 25. Giá trị tối đa là 200; các giá trị trên 200 sẽ được thay đổi thành 200.
|
pageToken |
string
Không bắt buộc. (Nếu tiếp tục từ một truy vấn trước đó.) Mã thông báo trang nhận được từ lệnh gọi biểu tượng cảm xúc tuỳ chỉnh trong danh sách trước đó. Cung cấp giá trị này để truy xuất trang tiếp theo. Khi phân trang, giá trị bộ lọc phải khớp với lệnh gọi đã cung cấp mã thông báo trang. Việc truyền một giá trị khác có thể dẫn đến kết quả không mong muốn.
|
filter |
string
Không bắt buộc. Bộ lọc truy vấn. Hỗ trợ lọc theo nhà sáng tạo. Để lọc theo nhà sáng tạo, bạn phải chỉ định một giá trị hợp lệ. Hiện tại, chỉ creator("users/me") và NOT creator("users/me") được chấp nhận để lọc biểu tượng cảm xúc tuỳ chỉnh theo việc biểu tượng cảm xúc đó có phải do người dùng gọi tạo ra hay không. Ví dụ: truy vấn sau đây trả về biểu tượng cảm xúc tuỳ chỉnh do phương thức gọi tạo:
creator("users/me")
Các truy vấn không hợp lệ sẽ bị từ chối kèm theo lỗi INVALID_ARGUMENT .
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nội dung phản hồi để liệt kê biểu tượng cảm xúc tuỳ chỉnh.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"customEmojis": [
{
object (CustomEmoji )
}
],
"nextPageToken": string
} |
Trường |
customEmojis[] |
object (CustomEmoji )
Danh sách không theo thứ tự. Danh sách biểu tượng cảm xúc tuỳ chỉnh.
|
nextPageToken |
string
Một mã thông báo mà bạn có thể gửi dưới dạng pageToken để truy xuất trang kết quả tiếp theo. Nếu trống, sẽ không có trang tiếp theo.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/chat.customemojis
https://www.googleapis.com/auth/chat.customemojis.readonly
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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)."]]