'KiteConnect' object has no attribute 'generate_session'

rasumaya
I am new to Kiteconnect (although have been using the API of your competitor for quite sometime). I created the app but have been unable to resolve the error 'KiteConnect' object has no attribute 'generate_session'. I have ensured that I follow the instructions in the documentation. Can you please help.

Below is my code:

import logging
from kiteconnect import KiteConnect

logging.basicConfig(level=logging.DEBUG)

api_key = "My API Key"
api_secret = "My API Secret"

kite = KiteConnect(api_key=api_key)
print(kite.login_url())

request_token = "request_taken_obtained"

data = kite.generate_session(request_token, api_secret=api_secret)
kite.set_access_token(data["access_token"])
kite.access_token()
Sign In or Register to comment.