chat.media.upload
Uploads a file attachment to a Google Chat space for use in messages or import workflows.
Instructions
Uploads an attachment. For an example, see Upload media as a file attachment. Requires user authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.messages.create - https://www.googleapis.com/auth/chat.messages - https://www.googleapis.com/auth/chat.import (import mode spaces only) You can upload attachme [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON UploadAttachmentRequest object accepting filename; pass it via params or whole via body_file Siblings over the same resource: download.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| parent | Yes | [URL path segment] Required. Resource name of the Chat space in which the attachment is uploaded. Format "spaces/{space}". | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON UploadAttachmentRequest object. | |
| request_body | No | Request body of type UploadAttachmentRequest: pass it via `params` (merged into the built body) or whole via `body_file`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attachmentDataRef | No |