5. Resend an OTP code

To resend an OTP code, in case the end user didn’t receive the OTP in a reasonable timeframe you can use this operation to resend the same OTP code.
The OTP code delivered will be the same as the original one. You have the option to choose a different delivery channel.

Basic Example for resending an OTP code (JSON):

curl \
-X POST \
-H "apikey: yourApiKey" \
https://api.tyntec.com/2fa/v1/otp/b3eaee2c-c3c4-4f40-87e5-c21d07905b27?via=VOICE

* b3eaee2c-c3c4-4f40-87e5-c21d07905b27 is the uuid of the generated OTP request for this example.
* in this example we force the API to re send the OTP via voice channel.

Parameter Optional/Mandatory Possible values Description
Via

Optional

  • AUTO
  • SMS
  • VOICE
You can force a delivery channel by using this parameter.
The default is “AUTO” which will use SMS in case of a mobile number and VOICE in case of a landline number.
sender

Optional

Sender name for OTP delivery via SMS In case you want to override the sender set in the application's configuration, you can specify a sender name for this OTP delivery
caller Optional Caller id for OTP delivery via Voice In case you want to override the caller set in the application's configuration, you can specify a caller id for this OTP delivery

Response to Basic Example for resending an OTP code (JSON)

HTTP/1.1 200 OK
{ accountId: 'your account id',
"applicationId": "2a9a2a1f-ad49-39e4-9a0e-8f2b648ebf83",
 "otpId": "b3eaee2c-c3c4-4f40-87e5-c21d07905b27",
 "number": "+4412312313",
 "attemptCount": 1,
 "otpStatus": "ACTIVE",
 "expire": 1499862186616,
 "created": 1499860686616,
 "timestampCreated": "2017-07-12T11:58:06.616Z",
 "timestampExpire": "2017-07-12T12:23:06.616Z"
 }