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’}

1st time I’m trying to set up the system

Hi @f9IajTmw1J,

Apologies for the delay in reverting. Are you still facing the issue? Kindly let me know. Will look into it.

Thanks!

I have the same problem. the Access token gets generated but somehow no API goes through .. same -17 error code and Could not authenticate user

Hello Vanshika,

I am facing the above mentioned issue, kindly let me know of a resolution for the same.

Hi Traders,

Greetings from Fyers.

Sorry for the trouble you all are facing,
Please follow this sample code steps and you will be able to generate the access token and hit an api.
https://github.com/FyersDev/fyers-api-sample-code/blob/sample_v2/My%20API%20Sample%20Script(GET%20STARTED)/Sample_Test_trading_Data.py

Please let me know any problem you are facing in DM .

Hope this Helps,
Happy Trading

Can I have similar sample for NodeJs?