once I got the URL I manually logged into to get the Token from the browser. Then I copied the Token into my code and tried to use it to create a session using below:- kiteSdk.generateSession(REQ_TOKEN_VALUE, API_KEY); Now I am getting TokenException.
Can you let me know how to resolve this? is the way I got the TokenKey correct?
A request token is valid only for a few minutes and can be used only once.
Use fresh generated request token to retrieve access token ,and save it in your local database.
Use this access token for signing subsequent requests.
This access token is valid for a whole day .
Also,you have to pass api_secret and not api_key with the request token in the generate session function .
a) To use KiteConnect APIs,you have to make a KiteConnect App,after successful creation,you will get both api_key and secret.A Kite Publisher app is only a gateway to place orders.
Use fresh generated request token to retrieve access token ,and save it in your local database.
Use this access token for signing subsequent requests.
This access token is valid for a whole day .
Also,you have to pass api_secret and not api_key with the request token in the generate session function .
a) API secret
b) how to get a freshly generated requested token?
I have only API key and my user ID.
b)https://kite.trade/forum/discussion/11441/user-user-kitesdk-generatesession-request-token-your-apisecret#latest