Hi Kamal,
which API version are you referring to here.
If it's API V2 Please refer this docs https://myapi.fyers.in/docs/#tag/Authentication-and-Login-Flow-User-Apps/paths/~1Authentication%20&%20Login%20Flow%20-%20User%20Apps/patch 221
The calling method here will be appsession.generateauthcode()