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.
Calendar API cung cấp một số khái niệm chủ yếu hữu ích cho khách hàng Google Workspace. Những khách hàng này thường có các tài nguyên (phòng, máy chiếu, v.v.) mà họ có thể muốn đặt trước cho các sự kiện cụ thể. Ngoài ra, thông thường, bạn sẽ tạo các ứng dụng nội bộ cần có quyền truy cập vào tất cả lịch của người dùng trong một miền, chẳng hạn như để thêm các sự kiện của công ty vào lịch.
Phòng và tài nguyên trong miền
Bạn có thể đặt trước tài nguyên và phòng bằng cách thêm chúng vào sự kiện dưới dạng người tham dự, sử dụng địa chỉ email của chúng. Khi nhận được lời mời, họ sẽ tự động chấp nhận hoặc từ chối sự kiện dựa trên tình trạng rảnh và quyền truy cập của người dùng mời.
Truy cập vào lịch của miền dưới dạng ứng dụng
Ứng dụng có thể truy cập vào lịch thuộc sở hữu của miền mà không cần thông tin đăng nhập của người dùng nếu xác thực bằng tài khoản dịch vụ. Tài khoản dịch vụ phải có quyền truy cập cần thiết bằng cách sử dụng quyền uỷ quyền trên toàn miền. Để mạo danh một tài khoản người dùng, hãy chỉ định địa chỉ email của tài khoản người dùng bằng phương thức setServiceAccountUser của nhà máy GoogleCredential.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[],[],null,["# Domain resources, rooms & calendars\n\nCalendar API offers several concepts that are primarily useful for\n[Google Workspace](https://workspace.google.com/)\ncustomers. These customers often have\nresources---rooms, projectors, and so forth---that they may wish to\nbook for specific events. Furthermore, it's common to build internal apps that\nneed access to all user calendars in a domain, for example to add corporate\nevents to them.\n\nDomain resources \\& rooms\n-------------------------\n\nYou can book resources and rooms by adding them to events as attendees, using\ntheir email address. When they receive the invitation, they automatically\naccept or decline the event based on the availability and access right of the\ninviting user.\n| **Note:** The Calendar API does not offer a way to create resource calendars. To do this, you need to use the Directory API's [Calendar Resource](/workspace/admin/directory/reference/rest/v1/resources.calendars) object. The calendarId corresponds to the resourceEmail field of the Calendar Resource representation.\n\nAccessing domain calendars as an app\n------------------------------------\n\nAn app can access domain-owned calendars without requiring\nuser credentials if it authenticates using a [service\naccount](/identity/protocols/OAuth2ServiceAccount). The service account must\nhave the necessary access using [domain-wide authority\ndelegation](/identity/protocols/OAuth2ServiceAccount#delegatingauthority). In\norder to impersonate a user account, specify the email address of the user\naccount with the `setServiceAccountUser` method of the `GoogleCredential`\nfactory."]]