Is their any solution for this error "Your auth code has expired. Please generate a new auth code"

***This is the code in python***

from fyers_api import fyersModel
import os
import requests
from fyers_api import accessToken
import credential
session = accessToken.SessionModel(client_id=[credential.app](http://credential.app)_id,secret_key=credential.secret,redirect_uri=credential.redirect_url, response_type="code",grant_type="authorization_code")
print(session.generate_authcode())
auth_code = input("Provide Your auth code :")
session.set_token(auth_code)
response = session.generate_token()
response = session.generate_token()
print(response)

***whenever I am trying to login gives the following error***

**{'s': 'error', 'code': -413, 'message': 'Your auth code has expired. Please generate a new auth code'}**

facing the same issue. The token is getting expired after single use.

The issue is real and persistent. I generate a new auth code and new token and when I try to get the Profile, I get a message saying “message: ‘Your auth code has expired. Please generate a new auth code’”. This happens in the NodeJS sample code shared by ur org in NPM website. Please advice.

Hey @100140584156345983500

Can you please try to login and hit the API with the sample code given in the below URL :
https://myapi.fyers.in/docsv3#tag/Authentication-and-Login-Flow-User-Apps/paths/~1Authentication%20&%20Login%20Flow%20-%20User%20Apps/post

If this doesn’t work please mask your credentials and send us the script used , that would be helpful to check this .