Unable to login

Resolved

I am unable to generate auth_code.

I am using this url to generate the token and auth code.

https://api-t1.fyers.in/api/v3/generate-authcode?client_id=<my_id>&redirect_uri=https%3A%2F%2Fwww.google.co.in%2F&response_type=code&state=None
It was working all this time and suddenly stopped generating auth_code url, it just says success. I checked the documentation there is no change there too. Is there any issue at fyers api end?

"

session = fyersModel.SessionModel(

client_id=client_id,

secret_key=secret_key,

redirect_uri=redirect_uri,

response_type=response_type,

grant_type=grant_type

)

newurl = "https://api-t1.fyers.in/api/v3/generate-authcode?client_id=T***-100&redirect_uri=https%3A%2F%2Fwww.google.co.in%2F&response_type=code&state=None"

this is the code i have been using since auto-login was removed.

auth_code = newurl[newurl.index('auth_code=')+10:newurl.index('&state')]

print(auth_code)

session.set_token(auth_code)

response = session.generate_token()

print(response)

access_token = response["access_token"]

a=open("access_token.txt","w")

a.write(access_token)

"

6 replies