gmail-api

Gmail API find parent of a draft

久未见 提交于 2019-12-06 11:35:40
How can I find the parent of a draft (if it exists) in Gmail? When the user responds to a particular message in a Gmail Thread , the draft appears directly below it. Say for example, there was 5 messages in a thread and a draft was made in reply to the 3rd one... that draft would always appear as the 4th message. I'm attempting to reproduce this in my application, but I need a way of mapping a draft to the message it is in response to if any. I've been searching through the values returned, but cannot find any reference to previous messages. How can I do this through the API? Edit: You have to

Google API: Gmail Service Push Notification (Watch) - User not authorized to perform this action

。_饼干妹妹 提交于 2019-12-06 10:52:34
问题 I am trying to call watch() on a mailbox. I set up a service Iam account, and created a topic and suscription. I gave my service account full(owner) rights to my topic and subscription. But when calling execute on watch(), I get the error: Google.Apis.Requests.RequestError Error sending test message to Cloud PubSub projects/projectid/topics/topicname : User not authorized to perform this action. [403] Errors [ Message[Error sending test message to Cloud PubSub projects/projectid/topics

New GMail API Signatures Settings

℡╲_俬逩灬. 提交于 2019-12-06 09:09:34
问题 I've tested the EMail Settings API with many third party tools, and it seems to strip inlined embedded images (Base64), however the WebGUI can create inline embedded images in signatures with some browsers. Has this been improved in GMAIL API Signatures? Will the new API accept (or continue to strip) inlined embedded images? 回答1: Gmail does not support inline image embedding for signatures, only image linking. In general, the API doesn't provide any capabilities beyond what the UI already

Gmail API limitations for getting mails

我与影子孤独终老i 提交于 2019-12-06 08:59:23
As I understand currently google's API provides 10 requests per second to its API ( from their docs ), and it looks to be far from enough for comfortable work with mail. I need to get all emails' headers (or at least senders and recipients). Is there anything better than waiting numberOfMails / 10 seconds? I'm currently accessing API from client side JavaScript application, I'm thinking of distributing API calls for the same user over a number of machines/applications, but's still unclear if their limits apply to gmail user or registered application. Anyway, hope to get some ideas what to do

Understanding Gmail api quotas

喜你入骨 提交于 2019-12-06 08:36:47
问题 I have read the gmail api quota explanation here (https://developers.google.com/gmail/api/v1/reference/quota), but am still having troubles understanding what causes us to go over the limit. Question 1: What is a user in a per user quota? I am not sure if the user is an individual gmail user, or a service client using the gmail api. Question 2: We've seen the following error a few times, but don't see any obvious limit we've hit. "error": { "errors": [ { "domain": "usageLimits", "reason":

Python - Parse gmail messages().get() with format='raw'

Deadly 提交于 2019-12-06 08:19:05
问题 I'm using gmail api to get messages from my mailbox. But when using format='raw' in get method, I can't parse the returned data in 'raw' filed. service.users().messages().get(userId='me', id=message_id, format='raw').execute() This is in the document, "raw": Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. and I tried base64.urlsafe_b64decode(raw.encode('utf-8')) base64.urlsafe_b64decode(raw.encode('ascii'))

Get Message Without History From Gmail API

喜你入骨 提交于 2019-12-06 08:15:25
问题 I'm using the Gmail RESTful API directly (not from some library). Looking at the documentation here Gmail Documentation. I have managed to get the content of the message body, however it also returns the whole history chain for the current message. Is there a way to get a response from the API only the requested message body, without the whole thread history? 回答1: According to this thread, it is not possible because it is part of the email's body content and you're specifying the ID of the

How to send email using GMAIL API having HTML body + attachment in ASP.NET

狂风中的少年 提交于 2019-12-06 07:45:21
var msg = new AE.Net.Mail.MailMessage { Subject = subject, Body = bodyhtml, From = new System.Net.Mail.MailAddress("myemail") }; foreach (string add in vendorEmailList.Split(',')) { if (string.IsNullOrEmpty(add)) continue; msg.To.Add(new System.Net.Mail.MailAddress(add)); } msg.ReplyTo.Add(msg.From); // Bounces without this!! msg.ContentType = "text/html"; ////attachment code foreach (string path in attachments) { var bytes = File.ReadAllBytes(path); string mimeType = MimeMapping.GetMimeMapping(path); AE.Net.Mail.Attachment attachment = new AE.Net.Mail.Attachment(bytes, mimeType, Path

Invalid scope error when trying to access gmail api

为君一笑 提交于 2019-12-06 07:18:20
问题 400. That’s an error. Error: invalid_scope You don't have permission to access some scopes. Your project is trying to access scopes that need to go through the verification process. {invalid = [https:// mail.google.com/]} If you need to use one of these scopes, submit a verification request. This is the error that I am getting when I flowed the tutorial in this link: https://developers.google.com/gmail/api/quickstart/js In the link they asked me to access webserver via python but I am using

failedPrecondition error when authenticating with service account to Google API

旧时模样 提交于 2019-12-06 06:20:27
问题 I'm trying to fetch a given email from my own inbox (as project owner) using the Google API 2.0.0 RC4 for PHP. I have a project setup, a downloaded authentication file in JSON format and I have enabled the gmail API in the Google Developers Console. But when I run the following code I get a "Bad Request" error with reason "failedPrecondition". Now this leads me to believe that there is something wrong with the access rights, but I can't figure out what I need to do here. Code: <?php require