zerodha / kiteconnectjs

The official typescript client library for the Kite Connect trading APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Postback(webhooks)

sivamgr opened this issue · comments

You can just run a simple web server which accepts the POST request and validates the checksum.

commented

Agreed, the API user can run a webserver of his choice. Does it make sense to, have an helper API included in kiteconnect, to validate the POST content.

kc.validatePostback(content).then(r){
// content validated. add code to handle content here...
}
.catch(err){
 //discard bad post-message
}

Yeah seems like a valid request. Will add it as a feature request.

Thanks for your feedback, it's added in version 1.2.2 - https://github.com/rainmattertech/kiteconnectjs/releases/tag/v1.2.2