verify_otp not working {'s': 'error', 'code': -2, 'message': 'something went wrong'}

Resolved

Hi Team,

I am trying to login through -

Not able to verify otp through - https://api-t2.fyers.in/vagator/v2/verify_otp

steps followed -

  1. call send otp - https://api-t2.fyers.in/vagator/v2/send_login_otp_v2

    1. request params - fy_id - base64 and app_id=2 (for web login)

    2. getting correct profile details with request_key in response.

    3. Note also tried with https://api-t2.fyers.in/vagator/v2/send_login_otp with actual fy_id (not encoded). both time getting correct response

  2. call verify otp https://api-t2.fyers.in/vagator/v2/verify_otp

    1. request params - 1. request_key -> received from step1 response & 2. otp -> generated from totp.

    2. If I run it through python - always getting error {'s': 'error', 'code': -2, 'message': 'something went wrong'}

    3. if I call same request through curl from same system - always getting error {"s": "error", "code": -1028, "message": "otp might be expired, please generate otp again"} -> I have cross verified otp in mobile app multiple times. its correct.

why there are different response when called through curl and python. Also getting error even if totp is correct.

Appreciate any help on this.

Thanks !!

2 replies