Invalid totp - AB1050


  • Hello All,

    Can anyone tell me about how to solve this type of error in PHP??
    Working in python but not working in PHP side. My all code in PHP, now it is not easy to move php to python.
    I was also try with totp but getting same error.

    code:
    require_once dirname(FILE).'/includes/SmartApi.php';
    $smart_api = new \AngelBroking\SmartApi();
    $login = $smart_api->GenerateSession("ang_id", "ang_pass");
    //$login = $smart_api->GenerateSession("ang_id", "ang_pass", "totp");
    $res = json_decode($login,true);
    $jwtToken = $res['response_data']['data']['jwtToken'];

    result: getting this error
    {"status":"success","http_code":200,"http_error":"","response_data":{"status":false,"message":"Invalid totp","errorcode":"AB1050","data":null}}{"status":"fail","error":"The token is invalid"}


  • Hi @pratik-rudani

    Apologies for delayed response.
    We are not facing any totp issue now. Kindly use the recent PHP SDK and let us know if the issue still persists.

    Thanks & Regards,
    SmartAPI team