kiteconnect.exceptions.PermissionException: Insufficient permission for that call.

pvgeorge
I am getting the following exception. what it means? How to proceed?

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/424961/minute?instrument_token=424961&from=2018-09-13&to=2018-09-27&interval=minute&continuous=0 HTTP/1.1" 403 None
Traceback (most recent call last):
File "", line 1, in
myhistoricalsig = kite.historical_data(dfoptionscrips1.instrument_token[0], date_three_week_before_str, this_day, 'minute')
File "C:\Users\pvgeo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 608, in historical_data
"continuous": 1 if continuous else 0
File "C:\Users\pvgeo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 697, in _get
return self._request(route, "GET", params)
File "C:\Users\pvgeo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 766, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.PermissionException: Insufficient permission for that call.
  • sujith
    You just need to log out and re-login.
    I think you created a session and then subscribed for historical data API.
  • pvgeorge
    The reason was expired subscription which is interesting. Renewal was done together for app and historical, but historical expired one day before. I don't know why?
    In the subscription expiring mails it was saying there is automatic renewal.
    **As you have linked your Zerodha account (xxxx) to your developer console, we will try to deduct money and renew your app automatically. Please make sure your Zerodha account has enough money.
    There is sufficient funds but it failed to renew subscription automatically. The exception problem is solved by renewing and relogin.
Sign In or Register to comment.