Jump to content
Santoshakumar Khavekar

How to start with webhook endpoint for Notification.

Recommended Posts

Hi, I am trying to integrate Evernote api in my application.so i have gone through all the document for creating consumer key and secret .I have done all process and am able to get all notebooks and note list using API in node.js.

Now I want to implement if any user updates or create notes ,I need to handle those so for that I have found webhook concept.Therefore i have registered Webhook endpoint(utl:- https://xxx.xx.xx.xxx:xxxx/evernote/notification) two days back only and I have got email from support team as "Webhook endpoint updated successfully".Now I think my webhook url for activated to get notify once user update or create notes in their account.

I wrote one http module and started handling the request on url which I have registered for webhook like this,If I have updated any notes or created notes in evernote account manually,I am not able to get any request handling in that function.

 

can somebody tell me whats going on here?

 

 

Thanks in advance.

 

 

 

Share this post


Link to post

Evernote developer support is now done on StackOverflow; please post there and tag your question with "Evernote".  (When you post, please include the actual webhook code you've written - no one will be able to diagnose what's going on without seeing what you're doing.)

Share this post


Link to post

Okay Phils. Thank you for reply.I will post in stack overflow as well.you can see my code here

handle["/evernote/ notification "] = evernote_notification;         //Just routing to function when notifys


function evernote_notification(response,request){
    var parsedUrl = url.parse(request.url, true); // true to get query as object
    var queryAsObject = parsedUrl.query;
    console.log("evernote_notification:- queryAsObject- "+ JSON.stringify(queryAsObject));
    var userId=parseUrl.query.userId;
    var guid=parseUrl.query.guid;
    var reagon=parseUrl.query.reason;
    console.log("evernote_notification:- userId="+userId+"  &&guid= "+guid+"  &&reagon= "+reagon);
     if (userId && guid && reagon) {
        //here I need to get userinformation with updated details of his/her account
     }
}

Edited by Santoshakumar Khavekar
Code added

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...