2. I visit following site to calculate SHA-256 checksum (I know the way to do this in Python but first I need to get the proper visibility of the process) https://defuse.ca/checksums.htm#checksums Support api_key = aaa, request_token = xxx and api_secret = bbb, I enter
@Kailash No since document does not specify to use it for given POST request. At given link https://kite.trade/docs/connect/v3/user/ under Authentication and token exchange nowhere it is written to mention kite version in header.
@ankur - `request_token`, 5 minutes - `access_token`, until invalidated using the API, or a master logout (from Kite web console), it'll last until the next morning 6 AM (every day flush is an exchange requirement). - `refresh_token` is a special long-standing token for read only requests issued selectively to exchange approved platforms
Hi i have written the following code and getting "gateway is busy error". Please help:
import { KiteConnect } from "kiteconnect"; import { getEnv } from "../lib/env"; import { configurationFile } from "../lib/config"; var kc = new KiteConnect( configurationFile[getEnv("NODE_ENV")].kiteConnect.apiKey ); let getRequestTokenUrl = "https://kite.trade/connect/login?v=3&api_key=qkexi19nbjdwf9jm";
Gateway is busy After Switching to kite version 3. While we are feteching the access token we are getting the following exception <-- 502 Bad Gateway https://api.kite.trade/session/token (405ms) 02-22 11:36:29.858 18519-19156/ D/OkHttp: Server: nginx 02-22 11:36:29.858 18519-19156/ D/OkHttp: Date: Thu, 22 Feb 2018 06:06:28 GMT 02-22 11:36:29.858 18519-19156/ D/OkHttp: Content-Type: application/json 02-22 11:36:29.858 18519-19156/ D/OkHttp: Content-Length: 83 02-22 11:36:29.858 18519-19156/ D/OkHttp: Connection: keep-alive 02-22 11:36:29.861 18519-19156/ D/OkHttp: {"status": "error", "message": "Gateway is busy", "error_type": "NetworkException"}
For Getting Access Token Body Request: POST-https://api.kite.trade/session/token request_token=XXXXXXXXXXX&api_key=XXXXXXXXXXXXXX&X-Kite-Version=3&checksum=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Response: 502 Bad Gateway https://api.kite.trade/session/token (379ms) { "status": "error", "message": "Gateway is busy", "error_type": "NetworkException" }
Is this consistent or intermittent?
Is this happening now?
Since when are you observing this error? How are you logging in?
{
"status": "error",
"message": "Gateway is busy",
"error_type": "NetworkException"
}
This is really annoying. I have paid for the API service and things are not working from your ends.
Not so professional.
It would be helpful if you can post more details for which API call you are getting this and more details to reproduce.
1. I get the request token from the redirect URL that I have set:
http://abcd.com/zerodha/redirect.php?status=success&request_token=xxxx
2. I visit following site to calculate SHA-256 checksum (I know the way to do this in Python but first I need to get the proper visibility of the process)
https://defuse.ca/checksums.htm#checksums
Support api_key = aaa, request_token = xxx and api_secret = bbb, I enter
aaaxxxbbb
in the box of the site and get a checksum
3. Put the data in postman:
Need help.
@sujith @Kailash Need help.
X-Kite-Version: 3
header?At given link https://kite.trade/docs/connect/v3/user/ under Authentication and token exchange nowhere it is written to mention kite version in header.
@Vivek sending you my API key in PM
X-Kite-Version: 3
in headers, it is working.One last question, what is the lifetime of
request_token
andaccess_token
? Also what arepublic_token
&refresh_token
?Thanks
- `request_token`, 5 minutes
- `access_token`, until invalidated using the API, or a master logout (from Kite web console), it'll last until the next morning 6 AM (every day flush is an exchange requirement).
- `refresh_token` is a special long-standing token for read only requests issued selectively to exchange approved platforms
Are you sure your final login URL is like this ?
You also need to make sure, you are sending all the headers as mentioned here.
The refresh token is only meant for platforms, it is not meant for the individual users.
You seem to be using old kiteconnectjs. You need to the latest version of kiteconnectjs.
Make sure you use new login URL.
Any solution to create request_token automatically??
It is mandatory by the exchange that a trader has to log in manually at least once a day. Automating login is not recommended.
After Switching to kite version 3.
While we are feteching the access token we are getting the following exception
<-- 502 Bad Gateway https://api.kite.trade/session/token (405ms)
02-22 11:36:29.858 18519-19156/ D/OkHttp: Server: nginx
02-22 11:36:29.858 18519-19156/ D/OkHttp: Date: Thu, 22 Feb 2018 06:06:28 GMT
02-22 11:36:29.858 18519-19156/ D/OkHttp: Content-Type: application/json
02-22 11:36:29.858 18519-19156/ D/OkHttp: Content-Length: 83
02-22 11:36:29.858 18519-19156/ D/OkHttp: Connection: keep-alive
02-22 11:36:29.861 18519-19156/ D/OkHttp: {"status": "error", "message": "Gateway is busy", "error_type": "NetworkException"}
Are you using javakiteconnect?
Are you appending query param(v=3) in login URL?
and this is the url i am using https://kite.trade/connect/login?v=3&api_key=XXXXXXXXXX
I am using the same format. But I am getting the same error gateway is busy
Please find the following request and response body
Login Webview URL
https://kite.trade/connect/login?v=3&api_key=XXXXXXXXXXXXXXXXXX
For Getting Access Token
Body Request:
POST-https://api.kite.trade/session/token
request_token=XXXXXXXXXXX&api_key=XXXXXXXXXXXXXX&X-Kite-Version=3&checksum=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Response:
502 Bad Gateway https://api.kite.trade/session/token (379ms)
{
"status": "error",
"message": "Gateway is busy",
"error_type": "NetworkException"
}
I am using python library, when try to get access_token.
Getting Gateway is Busy
Can you let us know what are the params you are sending?