DUO SMS Passcode

I am using DUO auth API to send SMS passcode to the users mobile asynchronously without bringing up the DUO frame. Is it possible to get SMS passcode code that is sent to the user? Is there an API to get that code in the server-side?

I am sending user name, factor, device and async parameters to the /auth/v2/auth post request and using SMS option to send one-time code. After sending, I get the following code:

I am trying to accomplish this.
I send an OTP to the user mobile from the server-side of my web application and then display a popup for the user to re-enter the passcode sent to his mobile. Once the user enters this in my web app pop-up (not in DUO frame window
in passcode text field section), I want to validate this entry against what is sent.

So is it possible to get the generated passcode?

Also, is it possible to send custom passcode, i.e, my 7 or 8 digit passcode?


The answer to both of your questions is no. :slight_smile:

If you want your website to actually perform the OTP generation it’s probably more efficient for you to just use a telephony provider’s APIs directly to send the SMS for you with passcodes you generate.