Method: subscriptions.create

Tạo gói thuê bao Google Workspace. Để tìm hiểu cách sử dụng phương thức này, hãy xem phần Tạo gói thuê bao Google Workspace.

Đối với một gói thuê bao trên tài nguyên đích Chat, bạn có thể tạo một gói thuê bao như sau:

Yêu cầu HTTP

POST https://workspaceevents.googleapis.com/v1beta/subscriptions

URL sử dụng cú pháp Chuyển mã gRPC.

Tham số truy vấn

Thông số
validateOnly

boolean

Không bắt buộc. Nếu được đặt thành true, thì sẽ xác thực và xem trước yêu cầu nhưng không tạo gói thuê bao.

Nội dung yêu cầu

Nội dung yêu cầu chứa một bản sao của Subscription.

Nội dung phản hồi

Nếu thành công, nội dung phản hồi sẽ chứa một thực thể mới tạo của Operation.

  • Trường metadata chứa một mảng trống.
  • Trường response chứa một phiên bản mới của Subscription.

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.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.