gmail-api

watch request to new topic pauses push notifications to existing topic

微笑、不失礼 提交于 2019-12-31 02:26:07
问题 I've configured two topics in my Google Cloud Pub/Sub account, each with a single subscription, under a single project. When I call watch() on my inbox, passing topic 1 to the watch request, I receive push notifications to my desired endpoint. When I call watch() on my inbox for topic 2 , I receive push notifications for the endpoint tied to topic 2, but push notifications stop arriving for topic 1 . It appears that only a single topic can push out notifications for a given inbox at any given

Gmail API Watch not filtering by Label

Deadly 提交于 2019-12-28 15:15:21
问题 I am using Gmail Push Notifications with Google PubSub and have a custom label that I want to monitor for any changes. I use the following code to register a watch for the label (Id of the label is Label_1) WatchRequest wr = new WatchRequest(); wr.TopicName = "projects/" + primaryLink.ggProjectId + "/topics/iLink" + segmentId; if (labels != null && labels.Count > 0) { wr.LabelIds = new List<string>(); wr.LabelIds.Add("Label_1"); wr.LabelFilterAction = "include"; } WatchResponse wrr = gs.Users

Gmail API: 400 bad request when trying to send an email (PHP code)

荒凉一梦 提交于 2019-12-28 03:04:56
问题 I expected the code below to send an email, but I'm only getting this: An error occurred: Error calling POST https://www.googleapis.com/gmail/v1/users/me/messages/send: (400) Bad Request I get a 200 OK using the Google Developers Console here at the bottom. Any help? $client_id = '599901532082-js1r50n20q6n5mir9fo1g81qkj9kfn3j.apps.googleusercontent.com'; $service_account_name = '599901532082-js1r50n20q6n5mir9fo1g81qkj9kfn3j@developer.gserviceaccount.com'; $key_file_location = '/tmp/APIProject

Cannot get the body of email with Gmail PHP API

一个人想着一个人 提交于 2019-12-27 11:42:24
问题 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 = getClient(); $gmail = new Google_Service_Gmail($client); $list = $gmail->users_messages->listUsersMessages('me', ['maxResults' => 1000]); while ($list->getMessages() != null) { foreach ($list->getMessages() as $mlist) { $message_id = $mlist->id;

Why can't i use gapi.client.gmail.users.labels.list?

三世轮回 提交于 2019-12-25 16:56:28
问题 My variable 'gapi.client.gmail.users.labels.list' isn't equal to Null but i can't work with this. Error text is Uncaught TypeError: Cannot read property 'users' of undefined How can i solve this bug??? There is my code: var API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxx'; var OAUTH2_CLIENT_ID = 'xxxxxxxxxxxxxxxxxxxxx.googleusercontent.com'; var OAUTH2_SCOPES = [ 'https://www.googleapis.com/auth/youtube', 'https://www.googleapis.com/auth/gmail.readonly' ]; var DISCOVERY_DOCS = ["https://www.googleapis.com

“Insufficient Permissions” Error with Google Appscripts

China☆狼群 提交于 2019-12-25 12:40:15
问题 I get following error when I try to create draft using google appscripts { "error": { "errors": [ { "domain": "global", "reason": "insufficientPermissions", "message": "Insufficient Permission" } ], "code": 403, "message": "Insufficient Permission" } } I enabled GMAIL api service in resource --> Advanced google services. I am using the following end point to create the draft. https://www.googleapis.com/gmail/v1/users/me/drafts I am not sure if I need to enable any other api to make this work.

When OAuth2 Google API script is called from other script, it is not possible to validate it

試著忘記壹切 提交于 2019-12-25 09:06:04
问题 Whenever OAuth2 Google API script is called for the first time it requires authentication. node googleAPIscript.js It simply provides link and asks for input. The given link contains generated string that should be pasted into the input. Now that is an issue when that script is first called from other script written in different language. I have a PHP web script that executes Google API Node script such as: echo exec('node googleAPIscript.js'); And the output string looks like this: Enter the

Send email in Gmail API - Objective C

守給你的承諾、 提交于 2019-12-25 09:00:03
问题 We are working on an iOS project that involves sending emails through the Gmail API and we are having trouble finding documentation on how to actually do this. First, we haven't completely figured out authentication. We are using AppAuth to handle that, and it's worked pretty well so far, but we are not quite sure how to link that up to the Gmail API in our code. Second, how do we send the message itself? We have the content and everything formatted, we just can't figure out how to actually

How to integrate Gmail Api in android app

陌路散爱 提交于 2019-12-25 06:34:23
问题 I have tried to integrate Gmail Api in my android app using the follwing tutorial https://developers.google.com/gmail/api/quickstart/android#step_5_setup_the_sample I followed every steps , but when i tried to test gmail api The following error occurred: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "usageLimits", "message" : "Access Not Configured. Gmail API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google

Gmail API credentialing?

假装没事ソ 提交于 2019-12-25 03:37:29
问题 I set up the Gmail API credentialing process as follows: string clientSecret = Settings.ClientSecret; string clientId = Settings.ClientId; Task<UserCredential> tCredential; ClientSecrets clientSecrets = new ClientSecrets {ClientId = clientId, ClientSecret = clientSecret}; tCredential = GoogleWebAuthorizationBroker.AuthorizeAsync( clientSecrets, Scopes, "user", CancellationToken.None); UserCredential credential; try { credential = tCredential.Result; } catch (Exception ex) { throw; } _service