Hi, I am executing the method for Historical data, and I am getting the error - 403 {"status":"error","message":"Insufficient permission for that call.","data":null,"error_type":"PermissionException"}
List historical = kite.GetHistoricalData( InstrumentToken: "408065", FromDate: new DateTime(2018, 1, 1, 12, 50, 0), // 2016-01-01 12:50:00 AM ToDate: new DateTime(2018, 1, 1, 13, 10, 0), // 2016-01-01 01:10:00 PM Interval: Constants.INTERVAL_MINUTE, Continuous: false );
I tried other methods, like getting LTP or Quotes, those methods are working.
I have faced the same issue after subscribing to Historical API addon.
You need to invalidate your access token. The current token doesn't have permission to access historical data. You can use 1 or 2 or 3 to invalidate access token.
1. Call invalidateAccessToken function available in Kite connect api file and then call generateSession function.
2. You can revoke access to you app kite.trade temporarily by going to link https://kite.zerodha.com/apps and then cancel revoke access. This would help you to invalidate access token if you have not implemented call to invalidateAccessToken function
3. You can go to https://developers.kite.trade/ and regenerate API secret. This would help you to invalidate access token.
The above three solutions are in reference to PHP implementation. I have used point 1 above personally to get rid of this error.
Once this is done, it will not throw insufficient permission error.
I have faced the same issue after subscribing to Historical API addon.
You need to invalidate your access token. The current token doesn't have permission to access historical data. You can use 1 or 2 or 3 to invalidate access token.
1. Call invalidateAccessToken function available in Kite connect api file and then call generateSession function.
2. You can revoke access to you app kite.trade temporarily by going to link https://kite.zerodha.com/apps and then cancel revoke access. This would help you to invalidate access token if you have not implemented call to invalidateAccessToken function
3. You can go to https://developers.kite.trade/ and regenerate API secret. This would help you to invalidate access token.
The above three solutions are in reference to PHP implementation. I have used point 1 above personally to get rid of this error.
Once this is done, it will not throw insufficient permission error.
Thanks