Token is not working

AnujSharma
AnujSharma edited June 3 in Python client
Hi,

I am using the below code to generate Access Token but it is stating that Token is invalid or expired. Can somebody help me in what I am doing wrong?

from kiteconnect import KiteConnect
import pandas as pd

api_key = "API _Key"
api_secret = "Secret API Key"
kite = KiteConnect(api_key=api_key)


print(kite.login_url())

request_token = " XXXXXX"

data = kite.generate_session(request_token, api_secret=api_secret)
  • rakeshr
    request_token = " XXXXXX"
    You have to extract request_token post successful login from above login_url. You can go through login flow documentation here.
Sign In or Register to comment.