How do I access the Evernote API in Firefox / Chrome extensions?

I'm ready to tinker with the Evernote API and use its Chrome / FF extensions. What I learned is that there is still no JS API that makes me think of building a middle tier service in php / python and allows my extension to access Evernote through that service.

The place where I got confused is authentication. How do I force a user to authenticate with Evernote from a browser extension? If it shows a static html page that then redirects to the login page in EverNote and stores the access token, etc. Server side. How my extension will be remembered in detail and make service calls and create / receive notes in my chrome extension.

The application workflow is as follows:

  • The user will be able to connect to Evernote through the Extension (by accessing the logging page).
  • Once logged successfully, the notes will be retrieved through the middle tier service in the Chrome Extension via an Ajax request.
  • The user can then post the message via an AJAX call to the service, which will then end up being stored in Evernote via the API

Please, please.

+3


source to share


2 answers


There is no official JavaScript API. But you can find a few unofficial ones. Take a look here for example: http://discussion.evernote.com/topic/22476-api-for-javascript/ Don't know how they work.

Here's another solution: Not sure if this is the correct way to do it, but you can emulate how the Evernote web browser works. It basically uses the internal clientKey / customerSecret along with the username and password to retrieve the oauthToken. It then uses this OauthToken for all api calls.

You can find this process in the Auth.js file of the webclipper source code. On mac the file is located at / Users /% user% / Library / Application Support / Google / Chrome / Default / Extensions / pioclpoplcdbaefihamjohnefbikjilc / 5.9.5_0 / js / main / Auth.js



I don't know of other systems, but it's hard to find it on Google.

Hope it helps.

+1


source


You can now find the official JavaScript library. (I'm not sure what the limitations of the Chrome extension are though)

https://github.com/evernote/evernote-sdk-js

I find it here. http://discussion.evernote.com/topic/34619-how-to-access-evernote-api-in-firefoxchrome-extensions/#entry250743



The library's FAQ says that

Can I test my code in the browser

Yes. You can test your code in Chrome. Open Chrome using open /Applications/Google\ Chrome.app/ --args --disable-web-security .

      

+1


source







All Articles