Unable to generate authcode with fyers_apiv2 installed

HI,

I am new to fyres. Trying to login using python and getting error while fetching authentication code.

Looks like the API generate_authcode() is still calling the v1 page ?

Redirect page:

https://api.fyers.in**/api/v1/**auth?..

Error:

API V1 is deprecated, Kindly switch to API V2, An email notice was sent earlier this month regarding the same, more info here https://fyers.in/notice-board/discontinuation-of-api-v1-w-e-f-18th-november-2021/

Hi Prashanth,
Please go through the documentation - https://myapi.fyers.in/docs/

Here is the code used

{snippet}

creating an instance appSession to generate the auth code by passing app id and redirect url as parameter

   appSession = accessToken.SessionModel(client_id=appId,redirect_uri=redirect_url,

                    response_type="code", grant_type="authorization_code",

                    state="state",scope="",nonce="")

   # The variable `generateTokenUrl` will have a url like

   # [https://uat-api.fyers.in/api/dev/generate-authcode?appId=B8PXXXH8T6&redirectUrl=https%3A%2F%2Fgoogle.com](https://uat-api.fyers.in/api/dev/generate-authcode?appId=B8PXXXH8T6&redirectUrl=https%3A%2F%2Fgoogle.com)

   generateTokenUrl = appSession.generate_authcode()



   # This command is used to open the url in default system brower

   [webbrowser.open](http://webbrowser.open)(generateTokenUrl, new=1)

{snippet}

Anything wrong here with the API usage ?

Updating to the latest fyers-apiv2 version 2.0.5 solved the issue