Kite Connect is purely an execution platform. We don't provide one to one support for Kite Connect. This is a community driven forum. We are not support agents. We are all developers who work on our projects and take out some time to help out fellow developers.
PS: Kite Connect is being used by thousands of apps in production, if it has any issues then this forum will be flooded with queries.
#!python
import logging
from kiteconnect import KiteConnect
logging.basicConfig(level=logging.DEBUG)
kite = KiteConnect(api_key="hjnl154ozm******")
data = kite.generate_session("itMnbneaEVTlh3b2lekVRtRl7cJBRGye", api_secret="qmqmjtg1htqzz1p3xld2******")
kite.set_access_token(data["access_token"])
print(data)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 403 None
911 # native Kite errors
912 exp = getattr(ex, data.get("error_type"), ex.GeneralException)
--> 913 raise exp(data["message"], code=r.status_code)
914
915 return data["data"]
TokenException: Token is invalid or has expired.
PS: Kite Connect is being used by thousands of apps in production, if it has any issues then this forum will be flooded with queries.