Function to retrieve an attachment to a message by id of the attachment and message. To save the attachment use save_attachment.

attachment(id, message_id, user_id = "me")

Arguments

id

id of the attachment

message_id

id of the parent message

user_id

gmail user_id to access, special value of 'me' indicates the authenticated user.

References

https://developers.google.com/gmail/api/v1/reference/users/messages/attachments/get

See also

Examples

# NOT RUN {
my_attachment = attachment('a32e324b', '12345')
save attachment to a file
save_attachment(my_attachment, 'photo.jpg')
# }