48PAsbJDcW
(Inactive Member)
1
AttributeError: ‘SessionModel’ object has no attribute ‘auth’
Tried sample code but not able to connect through API, facing above error
rom 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()
HvxNu5uhfN
(Inactive Member)
2
Hi Kamal,
which API version are you referring to here.
If it’s API V2 Please refer this docs https://myapi.fyers.in/docs/#tag/Authentication-and-Login-Flow-User-Apps/paths/~1Authentication%20&%20Login%20Flow%20-%20User%20Apps/patch
The calling method here will be appsession.generateauthcode()
48PAsbJDcW
(Inactive Member)
3
I am able to fix it. Tanks 