Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29934

Download Attachments from gmail using Gmail API

$
0
0

I am using Gmail API to access my gmail data and google python api client.

According to documentation to get the message attachment they gave one sample for python

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

but the same code i tried then i am getting error:

AttributeError: 'Resource' object has no attribute 'user'

line where i am getting error:

message = service.user().messages().get(userId=user_id, id=msg_id).execute()

So i tried users() by replacing user()

message = service.users().messages().get(userId=user_id, id=msg_id).execute()

but i am not getting part['body']['data'] in for part in message['payload']['parts']


Viewing all articles
Browse latest Browse all 29934

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>