Does this work differently for testing purposes i.e.,for http:/127.0.0.1 ? I am getting the request_token without the login page. Is this how it is intended to work ?
@hairajendra It worked for me. You need to post a request with your api_key+request_token+private_key to get the access token (check the documentation). It works only when the user logs in with the same request_token. Once the user logs in, you can then send commands with the API using the access token.
@Kailash If its cached...what will happen if one Zerodha customer ZC1 is logged in, and then we have to authenticate another Zerodha customer ZC2 by calling https://kite.trade/connect/login?api_key=xxx from backend server...it will come back with registered URL with the request_token of first Zerodha customer ZC1 right?...Do we have to follow any other procedure in this case?
@instruritesh The session is on the user's browser (i.e, the state of being logged in), not on the server. - User A logs in on his computer once, he doesn't see the login screen until he logs out - User B logs in on his computer once, same thing.
Maybe I am missing something here;
For the request https://kite.trade/connect/login?api_key=cbwbtp3fmtjhl2q6
the response is http://127.0.0.1:8000/app/requestToken/?&request_token=8l0ev1ab85pnh7aajt36b9i203rkbso6
I am expecting a login page. Is there anything I am doing wrong here ?
You need to post a request with your api_key+request_token+private_key to get the access token (check the documentation). It works only when the user logs in with the same request_token. Once the user logs in, you can then send commands with the API using the access token.
Thanks for the reply.
The problem for me is, when I redirect to https://kite.trade/connect/login?api_key=cbwbtp3fmtjhl2q6 , the response is coming back as http://127.0.0.1:8000/app/requestToken/?&request_token=8l0ev1ab85pnh7aajt36b9i203rkbso6
WITHOUT taking the flow through the login page. If you see, the requestToken is coming without a login page in between!!
What is the issue here ?
Hint : If I do cache clearing, then the login page comes. is this normal ?
- User A logs in on his computer once, he doesn't see the login screen until he logs out
- User B logs in on his computer once, same thing.