Issue to generate Token using https://api.fyers.in/api/v2/token

Hi, I am creating software for trading using fyers API. Currently I got issue to generate token.

authParam = {
                        "fyers_id":FY_ID,
                        "app_id":APP_ID,
                        "redirect_uri":REDIRECT_URI,
                        "appType":APP_TYPE,
                        "code_challenge":"",
                        "state":"None",
                        "scope":"",
                        "nonce":"",
                        "response_type":"code",
                        "create_cookie":True
                    }
 authres = ses.post('https://api.fyers.in/api/v2/token',json=authParam).json()

this is code. Please help me out.

Hey Akshay,

“https://api.fyers.in/api/v2/token” is a V2 endpoint. Please update it to the V3 endpoint: https://api-t1.fyers.in/api/v3/token

It should work as expected.

Thank you. Issue resolved.

Is it possible to share login procedure as getting auth code and token in python required to get it from browser window which is not prefered for algo trading… I mean working python script…

@WWhYB2qrsx Can you please share correct endpoint for verify_otp. I am using https://api-t2.fyers.in/vagator/v2/verify_otp but its not working. more details here -
https://fyers.in/community/t/verify-otp-not-working-s-error-code-2-message-something-went-wrong/21853?highlight=x4i1tnhHBr1QIxd

Please confirm if you’re still facing the issue. If so, let me know, I’ll assist you further.

issue is resolved. thank you

Hi Akshay wavare sir kindly help me for my first algo in python