Hi Team,
Today, I am receiving an error while generating Auth Code as : Please provide a valid Scope (Kindly refer screenshot).
I am using V3 python package of fyers.
The generateTokenUrl = appSession.generate_authcode() command generated following URL (which throws error on web browser):
https://api-t1.fyers.in/api/v3/generate-authcode?client_id=MY_CLIENT_ID_INC_100&redirect_uri=http%3A%2F%2F127.0.0.1%3A5000&response_type=code&state=MY_STATE&scope=MY_SECRET_KEY&nonce=authorization_code
however, on 11th Oct (yesterday), the same command generated a different URL (without scope & nonce variable) which was working successfully:
https://api-t1.fyers.in/api/v3/generate-authcode?client_id=MY_CLIENT_ID_INC_100&redirect_uri=http%3A%2F%2F127.0.0.1%3A5000&response_type=code&state=MY_STATE
Can Anyone please advise on this?
What I also noticed today is that value of scope variable is being assigned to state variable and vice versa in fyer’s v3 python command of generateTokenUrl.
Hi @aksjn.xtbk71q9
I have generated a url after looking at your case, I didn’t get any scope and nonce variables, for now omit the variables from the url.
Besides check if you are mentioning scope and nonce while generating Fyerssession - mine is as below for ref.
session = fyersModel.SessionModel(
client_id=app_id,
secret_key=secret_key,
redirect_uri=FyersTerms.redirect_uri,
response_type=FyersTerms.response_type,
grant_type=FyersTerms.grant_type,
)
Z4PBvkQGyF
(Inactive Member)
October 12, 2023, 11:34am
4
Hi @aksjn.xtbk71q9
Can you check once in different browser. As I am also seeing this error first time.
Usually it don’t come.