gmail-api

You do not have permission to call getContacts

被刻印的时光 ゝ 提交于 2019-12-24 16:44:26
问题 I'm developing the GMail Add-on that pulls out all user's contacts to card: var contacts = ContactsApp.getContacts(); I already enabled ContactsAPI in Google API Console and added scope: https://www.googleapis.com/auth/contacts.readonly But the error is still there and the Contacts API is missing in the project's Advanced Google Service pop-up. 回答1: Through trial and error, and this hard-to-find list I managed to get ContactsApp.getContacts() to work. You need to add this scope: "oauthScopes"

Getting error while sending email through Gmail

╄→尐↘猪︶ㄣ 提交于 2019-12-24 16:32:05
问题 Here I am trying to send mail using gmail but getting error below javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/ContinueSignIn? sarp=1&scc=1&plt=AKgnsbu7f 534-5.7.14 Zt- ibTxZf1iCvRrx_zqZ2e0gyU7UDBdKNf3Skj3y1daBQ4lwKDtlbWjuZVSBdqqJvWssPG 534-5.7.14 axQ9afV4DYvgwRA6V94E2JKjGlqxgk8V7wxG9-lgPZoqbzI4rgBIk8SjDYwFt06r7tzWjs 534-5.7.14 gn4zN1UWm- _BhrTGzjP02vV710gi2NHsgX7efxMTbZSowI02n1DL31Qhf_ba5vvtN8mSkI 534-5.7.14 mutNhiGJSG0_sSI0ZAiblBGGfc1o> Please log in via

send html template in email body

此生再无相见时 提交于 2019-12-24 14:48:17
问题 I want to implement a button which makes the user able to compose email in Gmail and in that email body, I want to send HTML email template which I already have in a separate file. how can I implement this is Nodejs or javascript? I can use https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1 to open a Gmail compose window but how to send HTML template in this link? 回答1: Please use html-to-text module, you can send text in html as email. 回答2: user node mailer you can pass your template with

Oauth2 token not working for gmail_xoauth gem

a 夏天 提交于 2019-12-24 11:36:21
问题 I'm currently getting a token via the omniauth-google-oauth2 gem per the following: https://github.com/zquestz/omniauth-google-oauth2 I store the token that comes back from the auth_hash . I then try to use the token by calling: require 'gmail_xoauth' imap = Net::IMAP.new('imap.gmail.com', 993, usessl = true, certs = nil, verify = false) imap.authenticate('XOAUTH2', 'myemail@gmail.com', Token.last) Problem is that I get an error: [8] pry(main)> imap.authenticate('XOAUTH2', 'myemail@gmail.com'

Gmail API: Watch Inbox label Only

自古美人都是妖i 提交于 2019-12-24 08:50:09
问题 I have the code below to watch a mailbox. As seen, in the lableIds, I only have one label, INBOX because I want to listen to only new messages. However, when I run this, it receives notifications every 30s or so with different messageid. Yet no change occurred in the INBOX, no new item was added/removed. How do I set my watch body to only listen to the INBOX for incoming messages? certificate= new X509Certificate2("file.p12"), "password", X509KeyStorageFlags.Exportable); credential = new

Callback returning undefined

旧街凉风 提交于 2019-12-24 08:23:33
问题 I'm trying to get data from the GMail API to be able to load attachment data from there base64 encryption though when I try to return it I am getting undefined. $Message['Content']['Attachment'][$Count]['Data'] = getAttachments($Message['Details']['ID'], message['payload']['parts'][key], function (filename, mimeType, attachment) { return 'data:'+mimeType+';base64,'+attachment.data.replace(/-/g, '+').replace(/_/g, '/'); }); function getAttachments(messageID, parts, callback) { var attachId =

Gmail - smtp error 421 4.7.0 [closed]

萝らか妹 提交于 2019-12-24 07:58:35
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . We are using gmail oAuth2 to send the mail from nodemailer and receiving below error - {"code":"EENVELOPE","response":"421 4.7.0 Temporary System Problem. Try again later (WS). e189-v6sm98ioe.0 - gsmtp","responseCode":421,"command":"DATA"} Out testing team by mistake run the automation test script and triggered

I want to get new Gmail notify by Google Cloud Pub/Sub API

随声附和 提交于 2019-12-24 07:18:38
问题 I have had very bad experiences with googleapis, lost one week but failed so I open questions to find the help of everybody. After creating a topic & subscription (with endpoint URL) from PUB/SUB of Google Cloud Flatform Console, I used nodejs with code bellow : var gmail = google.gmail({ auth: {---my auth---}, version: 'v1' }); gmail.users.watch({ userId: "me", resource: { topicName: "projects/responsive-hall-xxxx/topics/xxxx", labelIds: ["INBOX"] } } But got the error 403: { domain: 'global

Get the unread mail count gmail in Android

有些话、适合烂在心里 提交于 2019-12-24 06:51:44
问题 I want to get an int with the number of unread emails in the accounts of the device. I have seen that there is a new way to do this using the "Gmail Labels Public API" http://android-developers.blogspot.in/2012/04/gmail-public-labels-api.html I have read the documentation and downloaded the sample application and it really works. But I have two problems: ( My intention is to get an int with the number of unread conversations, i try this: public static int getUnreadGmailCount(Context context)

Create a filter using Gmail API

守給你的承諾、 提交于 2019-12-24 06:47:16
问题 Google released recently a new version of its Gmail API which now makes possible to create filters. However the documentation is quite limited and I'm facing issues to get it working. I'm using the latest version of their PHP client. Any help would be appreciated to construct the request body. public $gmail; public function createFilter($userId) { try { $filter = new Google_Service_Gmail_Resource_UsersSettingsFilters(); // Here, we should create the request body... // https://developers