GithubHelp home page GithubHelp logo

fedecia / gmail-api-sync Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 9.0 49 KB

Sync, query and parse Gmail e-mails with Google API

Home Page: https://www.npmjs.com/package/gmail-api-sync

License: MIT License

JavaScript 100.00%

gmail-api-sync's People

Contributors

fedecia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gmail-api-sync's Issues

Unable to login with credential file

@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?

Different messages' links are being mixed up with each other

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?

Authorization with Token From GOA

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

Search operator in queryMessage()

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?

how to handle token expire?

after a few test it error Something went wrong: Error: listMessagesInitial: The API returned an error: Error: unauthorized_client

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.