Getting Invalid TOTP


  • Hi Team.

    I am getting invalid TOTP error while I am trying to login.
    Please find below request I made:

    var axios = require('axios');
    var data = JSON.stringify({
    "clientcode":"My Id",
    "password":"My Password",
    "totp":"NQGVFQPSPFF6LYCFAKVFQGE5HA"
    });

    var config = {
    method: 'post',
    url: 'https://apiconnect.angelbroking.com/
    /rest/auth/angelbroking/user/
    v1/loginByPassword',

    headers : {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'X-UserType': 'USER',
    'X-SourceID': 'WEB',
    'X-ClientLocalIP': 'My IP Address',
    'X-ClientPublicIP': 'My IP Address',
    'X-MACAddress': 'My MAC Address',
    'X-PrivateKey': 'My Private Key'
    }
    data : data
    };

    axios(config)
    .then(function (response) {
    console.log(JSON.stringify(response.data));
    })
    .catch(function (error) {
    console.log(error);
    });

    How to resolve the error ?


  • Hi @Pavan-Kumar The above-mentioned TOTP value was incorrect. The TOTP value should be a six-digit number configured in the Authenticator app or generated using any NPM package with the above secret value. If the issue persists, please let us know with the required details.

    Regards,
    SmartAPI Team.