FYERS API Status: Inactive and not able to generate access token

Hi All,

I'm trying out fyers API for the 1st time. I have created an API App on https://myapi.fyers.in/, where it's showing Status as Inactive. Also tried the following code:

session = accessToken.SessionModel(client_id = _access_api['client_id'], redirect_uri = _access_api['redirect_uri'], response_type = 'code', scope = None, state = 123, nonce = None, secret_key=_access_api['secret_key'], grant_type= 'authorization_code')

auth_code = session.generate_authcode()

session.set_token(auth_code)

response = session.generate_token()

print(response)

access_token = response["access_token"]

Not able to generate an access_token. Which is giving the following error:

{'code': -17, 'message': 'Could not authenticate the user', 's': 'error'}

6 replies