gmail-api

Sending EMail from my Javascript App via GMail API - mail appears in GMail sent list, but isn't delivered to destination email address

回眸只為那壹抹淺笑 提交于 2019-12-01 07:48:46
问题 I've been writing a client (Chrome browser) App that integrates with GMail via the REST API. My app is written in Javascript/Angular and most of the GMail integration works fine. It can fetch from GMail - emails, profiles, labels, etc. I'm not able to send emails I create. However, the emails I try to send do appear in the GMail sent list and, if I modify the email by adding the 'INBOX' label, they also appear in the GMail inbox. But none of the emails make it to their destination. I've been

GMail API Super Admin access other users accounts via API?

ぐ巨炮叔叔 提交于 2019-12-01 06:24:13
My institution is currently running Google Apps for Education since early 2009. I’m responsible for creating, deleting, modifying, etc. , student email accounts. I’ve converted all my existing C# applications from the GData to the new Admin SDK - life is good. Last week one of the departments sent out an email to roughly 800 students that contained an error. I was asked if it’s possible to create a quick application that is able to remove the email for the 800 students inbox. Using my “Super Admin” domain account I was able to create an application using the Gmail API to go into my inbox and

Gmail API all messages

你说的曾经没有我的故事 提交于 2019-12-01 06:12:14
I need to get all messages in Inbox with gmail api. But I see only one way to do it. Get list of messages( id, threadID ) GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages?labelIds=INBOX&key={YOUR_API_KEY} With id`s get all messages in loop While GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages/147199d21bbaf5a5?key={YOUR_API_KEY} End of While But for this way needed 100500 request. Have anybody idea how to get with one request all messages(or just payload field)? Use batch and request 100 messages at a time. You will need to make 1000

Does the Gmail API support using OAuth Service Accounts?

故事扮演 提交于 2019-12-01 06:11:08
问题 I am trying to use the Gmail API with the Python Google Client library. I have created a Service Account credential through the Google Developer Console. I am then attempting to use those credentials like sO: from oauth2client.client import SignedJwtAssertionCredentials client_email = '<sanitised>@developer.gserviceaccount.com' with open("foobar-<sanitised>.p12") as f: private_key = f.read() credentials = SignedJwtAssertionCredentials(client_email, private_key, 'https://www.googleapis.com

Google's GMail API download attachments

邮差的信 提交于 2019-12-01 05:50:40
I'm using the PHP SDK for the new Gmail API. How do I fetch an attachment from an email? Here is the API documentation, but in this instance, it's missing example for PHP. Although I have seen people achieving this with PHP. EDIT: This is what I have so far, unsure if it's correct: $attachmentData = $service->users_messages_attachments->get($emailAccount, $messageId, $attachmentId); $myfile = fopen("excel.xlsx", "w"); fwrite($myfile, $attachmentData); fclose($myfile); Firstly we need to get the data from the attachment object: $attachmentObj = $service->users_messages_attachments->get(

Error 500 backendError with Gmail API and Google APIs Node Client

佐手、 提交于 2019-12-01 05:17:47
I'm trying to use the new Gmail API with the Google API Node client . I created a new project from the developer console, set up a new "Service Account" Client ID, and enabled access to the API. As a proof of concept, I am simply trying to list the threads in my inbox. When I enable the OAuth 2.0 toggle for the API explorer and enter my email address, the request succeeds and I see a JSON response with data. Now I try to do the same in Node: var googleapis = require('googleapis'); var SERVICE_ACCOUNT_EMAIL = '...SNIP...'; // generated by: openssl pkcs12 -in ...SNIP...p12 -out key.pem -nocerts

Topic is created on cloud pub/sub but unable to create watch on that topic

孤街醉人 提交于 2019-12-01 05:06:54
问题 I want to create watch on cloud pub/sub topic but unable to create it. For that I'm using the rest request request_Req.post({ url:'https://www.googleapis.com/gmail/v1/users/me/watch', headers:{ 'content-type': 'application/json', 'Authorization': 'Bearer '+ access_token, }, scope : [ 'https://mail.google.com/' ], 'body': JSON.stringify({ 'topicName' : "/projects/ProjectId/topics/TopicId", 'labelIds' : ["INBOX"] }); }),function(error, resp, body){ }); But I'm getting the error message Error

Gmail API all messages

假装没事ソ 提交于 2019-12-01 04:54:17
问题 I need to get all messages in Inbox with gmail api. But I see only one way to do it. Get list of messages( id, threadID ) GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages?labelIds=INBOX&key={YOUR_API_KEY} With id`s get all messages in loop While GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages/147199d21bbaf5a5?key={YOUR_API_KEY} End of While But for this way needed 100500 request. Have anybody idea how to get with one request all messages

GMail API Super Admin access other users accounts via API?

回眸只為那壹抹淺笑 提交于 2019-12-01 04:53:12
问题 My institution is currently running Google Apps for Education since early 2009. I’m responsible for creating, deleting, modifying, etc. , student email accounts. I’ve converted all my existing C# applications from the GData to the new Admin SDK - life is good. Last week one of the departments sent out an email to roughly 800 students that contained an error. I was asked if it’s possible to create a quick application that is able to remove the email for the 800 students inbox. Using my “Super

Sending email multipart/signed (RFC 3156) via Gmail APIs

断了今生、忘了曾经 提交于 2019-12-01 04:12:31
问题 Try to build a Message in compliance with RFC3156 [0], and send it via Gmail APIs (I'm using the python client implementation). What I get is: in my Gmail box, the message is correctly sent (I see exactly the message I built before)· What my receivers get is: a "multipart/mixed" message with the same payload of the message I sent. It seems, at some point, Gmail changes my Content-Type ... is this true? As workaround, I'm using a SMTP connection (which acts like I expect, sends the message