Gmail API . users . messages . attachments

Instance Methods

close()

Close httplib2 connections.

get(userId, messageId, id, x__xgafv=None)

Gets the specified message attachment.

Method Details

close()
Close httplib2 connections.
get(userId, messageId, id, x__xgafv=None)
Gets the specified message attachment.

Args:
  userId: string, The user's email address. The special value `me` can be used to indicate the authenticated user. (required)
  messageId: string, The ID of the message containing the attachment. (required)
  id: string, The ID of the attachment. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The body of a single MIME message part.
  "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
  "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
  "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
}