Invalid `api_key` or `access_token`. Traceback (most recent call last):

ATH

Hello Team,

I logged in around 9:17 and generated access token, please check how it got exception of Invalid `api_key` or `access_token`.
please refer the below log


ERROR:2022-04-27 11:30:06,026:MainThread:Got exception in get_order_history function Invalid `api_key` or `access_token`.
Traceback (most recent call last):
File "tick_robo.py", line 223, in get_order_history
order_history = kite.order_history(orderId)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect\connect.py", line 418, in order_history
return self._format_response(self._get("order.info", url_args={"order_id": order_id}))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect\connect.py", line 837, in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\kiteconnect\connect.py", line 913, in _request
raise exp(data["message"], code=r.status_code)
  • sujith
    Is it a 400 error or 403?
  • ATH
    Hello Sujith
    i didn't get any error 400 or 403

    please let me know how to get this error message in log if any exception occurred

    Thank you
  • SRIJAN
    SRIJAN edited April 2022
    Was it a InputException(400) or TokenException(403)?? It looks like input exception.
    Were you using set_access_token method??
  • sujith
    @ATH,
    You need to run with debug log enabled to get that data. You can know more here.
Sign In or Register to comment.