Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update kiteconnect login URL #82

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
vividvilla marked this conversation as resolved.
Show resolved Hide resolved
};

/**
Expand Down