gmail-api

Is there any nicer way to get the full message from gmail with google-api

谁说胖子不能爱 提交于 2020-01-23 21:38:33
问题 I'm working on a project where I, among other things, need to read the message in e-mails from my google account. I came up with a solution that works but wonder if there are any simpler ways? The first part of the code is pretty standard to get access to the mailbox. But I post it so you can see what I did to get it to work. SCOPES = 'https://www.googleapis.com/auth/gmail.modify' CLIENT_SECRET ='A.json' store =file.Storage('storage.json') credz=store.get() flags = tools.argparser.parse_args

trying to send email with gmail api receive 'raw' RFC822 payload message string

自闭症网瘾萝莉.ら 提交于 2020-01-21 10:35:34
问题 I'm trying to perform a simple Reply to email with Gmail API. I'm receiving the following error: Google.GoogleApiException: 'Google.Apis.Requests.RequestError 'raw' RFC822 payload message string or uploading message via /upload/* URL required [400] Errors [ Message['raw' RFC822 payload message string or uploading message via /upload/* URL required] Location[ - ] Reason[invalidArgument] Domain[global] my code is: var msg = service.Users.Messages.Get("me", labelItem.Id).Execute();//the original

Create a gmail filter with Gmail API nodejs, Error: Filter doesn't have any criteria

喜你入骨 提交于 2020-01-19 06:25:19
问题 Im having trouble creating a filter with Gmail API using node. Auth and scopes are fine; I get err "Filter doesn't have any criteria". Im guessing that im doing something wrong with headers / body / Resource Parameter, but cant work it out. Heres the function, I've tried a number of variants: function createFilter(auth){ var gmail = google.gmail({version:'v1','auth':auth}); // Create filter rule var data = { resource: { criteria: { from: "someone@gmail.com" }, action: { removeLabelIds: [

Create a gmail filter with Gmail API nodejs, Error: Filter doesn't have any criteria

我的梦境 提交于 2020-01-19 06:21:11
问题 Im having trouble creating a filter with Gmail API using node. Auth and scopes are fine; I get err "Filter doesn't have any criteria". Im guessing that im doing something wrong with headers / body / Resource Parameter, but cant work it out. Heres the function, I've tried a number of variants: function createFilter(auth){ var gmail = google.gmail({version:'v1','auth':auth}); // Create filter rule var data = { resource: { criteria: { from: "someone@gmail.com" }, action: { removeLabelIds: [

When I am using Gmail API ,I am getting java.lang.NoClassDefFoundError: com.google.gson.stream.JsonReader

我的未来我决定 提交于 2020-01-16 01:17:21
问题 I am following Google Developer's Doc .I have included all mentioned jars but at runtime I getting this.. java.lang.RuntimeException: An error occured while executing doInBackground() 09-19 12:42:06.416: E/AndroidRuntime(14215): at android.os.AsyncTask$3.done(AsyncTask.java:300) 09-19 12:42:06.416: E/AndroidRuntime(14215): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) 09-19 12:42:06.416: E/AndroidRuntime(14215): at java.util.concurrent.FutureTask.setException

Check specific user account quota usage for Gmail API

末鹿安然 提交于 2020-01-15 12:45:28
问题 I'm using Gmail API .NET client to send/get emails. Recently I started getting exceptions with this message for some gmail accounts, for both sending/getting emails: Google.Apis.Requests.RequestError User-rate limit exceeded. Retry after 2018-09-25T13:31:30.444Z [429] Errors [ Message[User-rate limit exceeded. Retry after 2018-09-25T13:31:30.444Z] Location[ - ] Reason[rateLimitExceeded] Domain[usageLimits] ] I'd like to know if it's possible to check a per-user quota usage for my project for

Batch request - 400 bad request response

本秂侑毒 提交于 2020-01-15 10:42:49
问题 I'm sending the following batch request for getting threads: POST /batch HTTP/1.1 Host: www.googleapis.com Accept-Encoding: gzip User-Agent: Magin (gzip) Accept-Language: en;q=1, fr;q=0.9, de;q=0.8, zh-Hans;q=0.7, zh-Hant;q=0.6, ja;q=0.5 Content-Type: multipart/mixed; type="application/http"; boundary="737d0154-1999-455c-9886-65d7121a1382" access_token=accToken&quotaUser=user --737d0154-1999-455c-9886-65d7121a1382 Content-Type: application/http Content-ID: <0x8d93fa0> GET /gmail/v1/users/me

Google Sign in server auth code nil iOS?

不问归期 提交于 2020-01-15 07:34:11
问题 We have Google sign in our application.We are providing serverClientID at the time of request of login. We are getting user.serverAuthCode as nil. Our request is like below : func googleLogin(){ var configureError: NSError? GGLContext.sharedInstance().configureWithError(&configureError) assert(configureError == nil, "Error configuring Google services: \(configureError)") let gid = GIDSignIn.sharedInstance() if let path = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist") {

email forwarding removes original sender's email address in Google app scripts

岁酱吖の 提交于 2020-01-15 07:27:08
问题 Here's my Google App Script code: var messages = threads[x].getMessages(); for (var y in messages) { messages[y].forward("someone@example.com"); } This forwards fine, but it resets the from field of message to the email id of account which executes the script. This removes all credentials of the original sender of message . How to forward the email more elegantly such that all original headers (at least from and to ) are retained? If the original message was sent to a list of people or a

Get list of message attachments without downloading whole message

亡梦爱人 提交于 2020-01-14 09:41:10
问题 I want a way to get a list of the attachments for a Message without having to download the whole message. With "Users.messages: get" we can set the fields to be returned but we can only choose "Payload" which will return the whole payload for the message https://developers.google.com/gmail/api/v1/reference/users/messages/get#try-it I only want a list of the attachments so that the user can select which attachment to go and fetch. Is there a more efficient way to do this?? Thanks for your help