Skip to main content
Question
FYERS API
Kamal
Kamalakar
Asked a question 8 months ago

Hi All, I am trying to get API authorization but failing with below error. Can someone suggest/help me from fyers_api import accessToken from fyers_api import fyersModel app_id = XXXX app_secret = XXXX app_session = accessToken.SessionModel(app_id, app_secret) response = app_session.auth() AttributeError: 'SessionModel' object has no attribute 'auth'

Join FYERS Community to pick others' brains on Trading/Investing

I'm not sure why you are using this for but assuming you are either generating auth_code or  access_token  and for that you should call the following functions respectively:

For Auth Code:

response = app_session.generate_authcode()

For Access Token:

response = app_session.generate_token()

 

I hope you get your answers