Questions tagged [gmail-api]

Use the Gmail API to add Gmail features to your app. RESTful access to threads, messages, labels, drafts and history. Easy to use from modern web languages.

Gmail API() gives you flexible, RESTful access to the user's inbox, with a natural interface to Threads, Messages, Labels, Drafts, and History. From the modern language of your choice, your app can use the API to add Gmail features like:

  • Read messages from Gmail
  • Send email messages
  • Modify the labels applied to messages and threads
  • Search for specific messages and threads

References:

4233 questions
101
votes
2 answers

How do I authorise an app (web or installed) without user intervention?

Let's say that I have a web app ("mydriveapp") that needs to access Drive files in a background service. It will either own the files it is accessing, or be run in a Google Account with which the owner has shared the documents. I understand that my…
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
57
votes
4 answers

'observe' on 'MutationObserver': parameter 1 is not of type 'Node'

I am creating a Chrome extension and trying to include a small text beside the SEND button of the gMail compose box. I am using a MutationObserver to know when the compose box window appears. I am doing this by observing an element with class no…
57
votes
9 answers

Sending email via Gmail & Python

What is the recommended way of sending emails with Gmail and Python? There are a lot of SO threads, but most are old and also SMTP with username & password is not working any more or the user has to downgrade the security of their Gmail (for example…
apadana
  • 13,456
  • 15
  • 82
  • 98
49
votes
3 answers

How do I send HTML Formatted emails, through the gmail-api for python

Using the sample code from the GMail API Example: Send Mail, and after following rules for authentication, it's simple enough to send a programmatically generated email, via a gmail account. What isn't obvious from the example is how to set that…
Andrew
  • 1,423
  • 1
  • 17
  • 26
45
votes
10 answers

Retrieving a user's public google/gmail picture

I'm writing an email-based application using the gmail-api, and i need to retrieve user public images for email address originating from google. I've seen other applications do that, but i can't seem a way to reliably get this data. some more…
shaish
  • 1,479
  • 1
  • 12
  • 23
43
votes
4 answers

Client is unauthorized to retrieve access tokens using this method Gmail API C#

I am getting the following error when i tried to authorize gmail api using service account "Client is unauthorized to retrieve access tokens using this method" static async Task MainAsync() { sstageEntities db = new sstageEntities(); …
Melvin
  • 877
  • 3
  • 11
  • 27
36
votes
6 answers

Google API quickstart.py error KeyError: '_module'

Using Gmail API. My client secret file is downloaded and working for Ruby. When I try the quickstart.py (python) version I get this error File "quickstart.py", line 70, in main() File "quickstart.py", line 55, in main credentials…
ElioRubens
  • 701
  • 1
  • 5
  • 9
35
votes
1 answer

API for Inbox by Gmail

Is there any talk of when there will be an API for the new Inbox by Gmail. We would like to integrate into it and would specifically like to tie into the Reminders and Snoozes.
Rodney Kuhn
  • 359
  • 3
  • 5
35
votes
5 answers

Gmail API returns 403 error code and "Delegation denied for "

Gmail API fails for one domain when retrieving messages with this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Delegation denied for…
32
votes
4 answers

How to send a message successfully using the new Gmail REST API?

I'm currently trying to test the new Gmail REST API. In the API Explorer it is possible to authorize requests using OAuth 2.0 and to execute a request, i.e. send a message. First I authorized. I'm using the following test data (and of course I…
Taifun
  • 6,165
  • 17
  • 60
  • 188
31
votes
7 answers

Cannot get the body of email with Gmail PHP API

I'm having trouble with the Gmail PHP API. I want to retrieve the body content of emails, but I can retrieve it only for emails which have attachments! My question is why? Here's my code so far: // Authentication things above... $client =…
F3L1X79
  • 2,575
  • 2
  • 29
  • 45
29
votes
4 answers

How to access the new Gmail API from my Android app?

I am trying to access the new Gmail API (announced 25.06.2014) from my Android app in order to return all e-mail messages in a certain users's account. I am developing the app in Eclipse using the ADT plug-in. What I have done so far: I registered…
ViktoriaDoneva
  • 293
  • 1
  • 3
  • 7
26
votes
2 answers

Bulk-fetching emails in the new Gmail API

I'm using the python version of the newly released Gmail API by Google. The following call returns just a list of message ids: service.users().messages().list(userId = 'me').execute() But then I just have a list of message ids and need to iterate…
Baruch Oxman
  • 1,616
  • 14
  • 24
25
votes
3 answers

Is there a way to pre-check or avoid the scopes checkbox in Google's Gmail / Google Calendar OAuth approval flow?

We currently use google-api-python-client to handle our user-facing OAuth flow. We had a few users email us asking why their accounts didn't import successfully, and when we looked, their tokens didn't have the appropriate scopes. For example, we…
25
votes
2 answers

Gmail API for sending mails in Node.js

Disclaimer: I have followed Google's own Node.js quickstart guide and successfully connect and use the gmail.users.labels.list() functionality. I have checked for questions/answers here, like this one (that is not using the Node.js API I am asking…
Sergio
  • 28,539
  • 11
  • 85
  • 132
1
2 3
99 100