Skip to content

Commit

Permalink
Merge pull request #82 from ranjanrak/update-loginURL
Browse files Browse the repository at this point in the history
chore: update kiteconnect login URL
  • Loading branch information
vividvilla committed Nov 21, 2022
2 parents 5b60e8e + 539beee commit 8a8cb1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var utils = require("./utils");
* @classdesc API client class. In production, you may initialise a single instance of this class per `api_key`.
* This module provides an easy to use abstraction over the HTTP APIs.
* The HTTP calls have been converted to methods and their JSON responses.
* See the **[Kite Connect API documentation](https://kite.trade/docs/connect/v1/)**
* See the **[Kite Connect API documentation](https://kite.trade/docs/connect/v3/)**
* for the complete list of APIs, supported parameters and values, and response formats.
*
* Getting started with API
Expand Down Expand Up @@ -67,7 +67,7 @@ var utils = require("./utils");
* to the Kite Connect class initialisation for subsequent requests.
* @param {string} [params.root="https://api.kite.trade"] API end point root. Unless you explicitly
* want to send API requests to a non-default endpoint, this can be ignored.
* @param {string} [params.login_uri="https://kite.trade/connect/login"] Kite connect login url
* @param {string} [params.login_uri="https://kite.zerodha.com/connect/login"] Kite connect login url
* @param {bool} [params.debug=false] If set to true, will console log requests and responses.
* @param {number} [params.timeout=7000] Time (milliseconds) for which the API client will wait
* for a request to complete before it fails.
Expand All @@ -79,7 +79,7 @@ var KiteConnect = function(params) {
var self = this
var defaults = {
"root": "https://api.kite.trade",
"login": "https://kite.trade/connect/login",
"login": "https://kite.zerodha.com/connect/login",
"debug": false,
"timeout": 7000
};
Expand Down Expand Up @@ -443,7 +443,7 @@ var KiteConnect = function(params) {
* @instance
*/
self.getLoginURL = function() {
return self.default_login_uri + "?api_key=" + self.api_key + "&v=3";
return self.default_login_uri + "?api_key=" + self.api_key + "&v=" + kiteVersion;
};

/**
Expand Down

0 comments on commit 8a8cb1c

Please sign in to comment.