Method: media.download

Gets an attachment. To download attachment media via REST requires the alt=media query parameter. Returns a 400 bad request error if attachment media is not available in the requested MIME type.

HTTP request

GET https://keep.googleapis.com/v1/{name=notes/*/attachments/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the attachment.

Query parameters

Parameters
mimeType

string

The IANA MIME type format requested. The requested MIME type must be one specified in the attachment.mime_type. Required when downloading attachment media and ignored otherwise.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of Attachment.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/keep
  • https://www.googleapis.com/auth/keep.readonly

For more information, see the Authorization guide.