☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
996
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
August 2016
sameer
August 2016
Vivek
Request_token generation code
sameer
August 2016
edited August 2016
in
Python client
1) Is request_token be generated ONLY manually using browser
OR
2)If it can be generated programmatically, can you please sample python code to retrieve request_token programmatically
Vivek
August 2016
@sameer
You can use headless browsers like
mechanize
or
selenium
but I am afraid I don't have any sample code to share with.
sameer
August 2016
edited August 2016
@vivek
Thanks Vivek ... Can simple pseudo-code like this work ?
1. HttpObj.redirect(false)
2. HttpResponse = HttpObj.sendPost(
https://kite.trade/connect/login?api_key=
)
3. redirectURL = HttpResponse.getHeader.get("Location");
4. requestToken = redirectURL.extractURLparam("request-token")
I mean just reading "Location" field from HttpResponse ?
Sign In
or
Register
to comment.
1. HttpObj.redirect(false)
2. HttpResponse = HttpObj.sendPost(https://kite.trade/connect/login?api_key=)
3. redirectURL = HttpResponse.getHeader.get("Location");
4. requestToken = redirectURL.extractURLparam("request-token")
I mean just reading "Location" field from HttpResponse ?