Resend OTP
Trulioo offers an optional endpoint that makes it easier to resend the same one-time passcode to your end-user if they request it. Resending the OTP will reset the timer for the passcode.
Request
Pass the transactionId in the request body to resend the same OTP to your end-user.
A sample request to the GlobalGateway API can be found below:
POST /v1/otp/resend HTTP/1.1
Host: <<endpoint>>
Content-Type: application/json
Authorization: Basic ACCESS_TOKEN
{
"transactionId": "3c3e1e5a-1035-421d-af8d-6e0fbbe1eee5"
}
Response
The resend endpoint returns different status codes indicating whether the OTP was successfully resent or not.
{
"statusCode": 201,
"description": "The passcode has been resent.",
"numberOfFailedAttempts": 0,
"numberOfResends": 1
}
Status Code | Description |
---|---|
201 | The passcode has been resent. |
400 | The passcode has been expired. This could be due to exceeding the expiry time or the maximum number of retries. |
401 | The max number of resends have been exceeded |
422 | The transaction id in the request is invalid. |
Updated over 2 years ago
What’s Next