Skip to main content

All Questions

0 votes
1 answer
276 views

Drafting a reply with gmail API doesn't attach draft to thread

I want to implement functionality to append a draft as a reply to an existing thread of emails using the gmail API in Python, but my drafts intended to be replies to a thread are created as standalone ...
David Enders's user avatar
3 votes
3 answers
3k views

Sending a reply with Gmail API Python

I created two Gmail accounts and I'm trying to create an e-mail thread between them with the Python Gmail API. I can send e-mails without any issue, but when it comes to replying to each other and ...
ibra's user avatar
  • 126
0 votes
1 answer
1k views

Inline / embedded attachments in emails sent by Google API through Python are also shown attached

I've been losing my mind over this issue for the past few days. To clarify my issue, I am trying to send emails with images embedded in them. I mostly use these embedded images for footer or social ...
Bram van Ulden's user avatar
0 votes
1 answer
101 views

GMAIL API: I cant change account in python

I want to change the account in python, but when I change flow=InstalledAppFlow.from_client_secrets_file('onerandomclient.json', SCOPES) For the other JSON, still connecting with the last account, ...
GundamUser's user avatar
3 votes
1 answer
1k views

Google oAuth2 python application not opening login page online

I've followed this document to create oAuth2 login application. Created a project and created an oAuth2 client ID as a web application. You can see the following code is the same as in the guide. It'...
Liaqat A.'s user avatar
0 votes
1 answer
192 views

How do I forward a message sent to me on Gmail?

Is there a specific way in Python that I can forward a message that was sent from someone to my account on Telegram, for example In other words, he directs the message to be received by mail to the ...
amr abdelzaher 's user avatar
2 votes
1 answer
931 views

I've been working with the Google API. Sometimes my refresh token refreshes and other times it fails and causes a 'RefreshError.' Why? How to fix?

Error: google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'}) However, ...
Nicholas Lira's user avatar
2 votes
1 answer
1k views

set custom labels for outgoing gmail api messages in python

I am trying to send emails using the Gmail API client for python (which is part of the Google APIs client). I have gone through the quickstart guide and succeeded in configuring the client so my ...
Houssem. E Zerrad's user avatar
0 votes
1 answer
326 views

What should my URI be for Google Cloud API

I would like to send emails using the Gmail API from a python script I have on my computer. Here is the code I have so far: test.py from google_auth_oauthlib.flow import InstalledAppFlow flow = ...
pythonNovice's user avatar
  • 1,461
2 votes
1 answer
2k views

How do I send a batch request to the Gmail-API in python?

I am currently writing a small python script that works with the Gmail-API. I am trying to send a batch request to the gmail server. As the native method of gmail for sending batch request got ...
Mxngls's user avatar
  • 544
0 votes
0 answers
428 views

Gmail API sends multiple mails during bulk sending

I am looking to send bulk emails using the Gmail API. I have an implementation using a for loop, which changes the receiver's email in every iteration, and creates a new message, and executes the ...
Avi Kumar Singh's user avatar
0 votes
1 answer
302 views

How do I download every Gmail email with Python?

I want to download them with as few API calls as possible. https://github.com/googleapis/google-api-python-client/tree/master/samples doesn't have Gmail.
Tim Clemans's user avatar
0 votes
1 answer
234 views

Fastest way to get emails from Gmail and write them into file

I'm making a script which gets n emails from my gmail inbox and writes n subjects into a text file. While this works fine currently. I am looking for a way to get for instance 20 emails in JSON ...
sergi martinez's user avatar
0 votes
1 answer
301 views

error code 400 when trying to read GMAIL using a service account

I'm using Gmail's API to read messages to an inbox. I have a project in the cloud developer portfolio. I sign in with the account whose inbox I have to get data from. I've made a service account ...
Alesi Rowland's user avatar
1 vote
1 answer
2k views

How to get the number of mail read and unread or sent and received with gmali-api?

I want to use python to know how many emails have been sent and how many have been received. label_id_one = 'INBOX' label_id_two = 'UNREAD' # Getting all the unread messages from Inbox unread_msgs = ...
user avatar

15 30 50 per page