fedecia / gmail-api-sync Goto Github PK
View Code? Open in Web Editor NEWSync, query and parse Gmail e-mails with Google API
Home Page: https://www.npmjs.com/package/gmail-api-sync
License: MIT License
Sync, query and parse Gmail e-mails with Google API
Home Page: https://www.npmjs.com/package/gmail-api-sync
License: MIT License
@fedecia
Hi I am just trying to implement this module to get messages list.
I didn't get any proper example to implement this module
what I have tried yet
var gmailApiSync = require('gmail-api-sync');
var outh=gmailApiSync.setClientSecretsFile('./client2.json');
var options = {query: 'from:facebook.com newer_than:2d'};
gmailApiSync.queryMessages(outh, options, function (err, response) {
console.log(err,response)
})
I am getting following error
Error: listMessagesInitial: The API returned an error: Error: Login Required
Can you please correct me where I am doing typo mistake?
I make use of the module to fetch emails from Google Alerts. Full of links. I noticed that the links of the previous e-mails are being added up to the next e-mail link. Allow me do demonstrate:
Email 1 links:
[
'http://www.foo.com',
'http://www.bar.com',
'http://www.foobar.com',
]
Now let's say e-mail 2 has only one link. What then will happen is this:
Email 2 links:
[
'http://www.foo.com',
'http://www.bar.com',
'http://www.foobar.com',
'http://www.email2links.com'
]
And so on.
Now, could it be a bug from the module or the Gmail API from Google itself?
I'm writing a Node app that interfaces with Gnome-Online-Accounts (GOA).
GOA can provide a token but it only returns something like:
[
'ya29.GlxiBPkSoKjCwTpke4jpryte0uMKM8b3uuMWyCaF...',
1257
]
The second value seems to be an expires_in
(seconds) value not an expiry_date
. I also can't find a way of getting a refresh token (it seems as though GOA controls all of that, so there is also not clientsecrets.json that I have access to, though I can get the clientId
and clientSecret
). It seems as though with the token, the id and the secret I should be able to get authorization but I'm failing to do so.
When I use authorizeWithToken
, loadClientSecrets
fails because I don't have a clientsecrets.json.
Is there some way to inject the secret and the id so that the token will work or am I doing something else wrong?
Thanks
How to set proxy params for gmail-api-sync? I did`n find options for this.
I was having issues to make use of newer_than
search operator and I checked the file and noticed it's accessing query
from options
. Doesn't it mean only query
will work? What about newer_than
and others?
after a few test it error Something went wrong: Error: listMessagesInitial: The API returned an error: Error: unauthorized_client
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.