I invoked the the online API - kite = KiteConnect(api_key=apikey) by passing the apikey for my APP. i am expecting the token in my redirect URL configured in my API. But i am not getting redirection.
But if I try the same manually by login through the https://kite.trade/connect/login?api_key=xxx by passing the key in api_key - it gets successfully redirected to my URL. Can you please check and advise.
@gobrainers@gmail.com . It's just like any other oauth like applications such as Facebook and Google auth obtaining request_token is a manual process which is done in browser. Once you get the request token you invoke python client with request token to get access token once and then use the obtained request token for subsequent requests.
Hi Vivek - I tried your approach where i got request_token through manual process done through browser and then invoked the python client with request token to get access token. After this - I invoked kite.holding() and getting the following error:
Is request_token issued only once (and never gets invalidated) in lifetime like api_key and api_secret ? Should process of request_token be done only once like process of getting api_key and api_secret
@sameerrequest_token expires in 5 minutes after its generation and also once its successfully exchanged to get access token. Ideally you should generate request_token only when your previous access_token is invalidated or to initiate first kite session.
request_token
is a manual process which is done in browser. Once you get the request token you invoke python client with request token to get access token once and then use the obtained request token for subsequent requests.InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
is there something that i am missing?
Should process of request_token be done only once like process of getting api_key and api_secret
request_token
expires in 5 minutes after its generation and also once its successfully exchanged to get access token. Ideally you should generaterequest_token
only when your previousaccess_token
is invalidated or to initiate first kite session.