Request_token generation code

sameer
sameer 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
    @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
    sameer 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.