It looks like you're new here. If you want to get involved, click one of these buttons!
def login():
br = mechanize.Browser()
url = "https://kite.trade/connect/login?v=3&api_key=XXXXXXXXXXXXX"
br.set_handle_robots(False) # no robots
br.set_handle_refresh(False) # can sometimes hang without this
response = br.open(url)
Same code was working fine and returning expected response. but it's returning
raise response
mechanize._response.httperror_seek_wrapper: HTTP Error 403: Forbidden
at response = br.open(url)
line.
When we open URL
"https://kite.trade/connect/login?v=3&api_key=XXXXXXXXXXXXX",
does kite expect any other parameters ?It is mandatory by the exchange that a user has to manually login at least once a day. We don't recommend automating login