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_

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’

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

I’m trying to get authorization_code & I got the code from official documentation ( API - FYERS ). I tried above code but it is generating URI which can’t accessible. can you help me with complete login process.