Auth_status endpoint waiting for request completion?


Hi There,

I’m attempting to build an authentication integration through the API. Most everything is working as expected, except for the auth_status endpoint when working through an ‘asynchronous’ request (only tested using the ‘push’ factor)

The initial request returns the ‘txid’ attribute as documented.

However, when I then try to check on the status of that authentication after a few seconds using the auth_status endpoint, sending ‘txid’ as a parameter, the API call results are not returned until the authentication request has completed (‘allow’ or ‘deny’), or the https connection times out, similar to a ‘non’-asynchronous request.

This isn’t what I had anticipated, thinking instead the results of the query would be returned ‘immediately’, indicating whether the request has completed, or is still ‘waiting’. Have I made an incorrect assumption, or perhaps done something wrong?




Could you provide an example of your application’s POST to /auth/v2/auth?



Sure thing!

I’m pulling these values out of the example Java client with some added ‘println’ lines…

To /auth/v2/auth endpoint is posted:
where $deviceId is the Duo ID for the device
and where $uid is the Duo username associated with ‘my’ (test) account.

The endpoint returns (in my latested test):
{“txid”: “$transactionId”}

where $transactionId is a GUID that I assume is a ‘transaction identifier’ :slight_smile:

I then send a ‘GET’ request to:

with the query parameters:

… and the call to that endpoint holds the HTTPs connection open until the authentication is complete, or the HTTPs connection times out.




I’m curious as to where this topic got to. I have the same question as Sean, in that the call to auth_status responds the first time but time’s out on subsequent calls.

The API documentation is ambiguous in that the description for auth endpoint async param states:
“If you enable async, then your application will be able to retrieve real-time status updates from the authentication process, rather than receiving no information until the process is complete.”

However, the description for the auth_status endpoint states:
" The /auth_status endpoint “long-polls” for the next status update from the authentication process for a given transaction. That is to say, if no status update is available at the time the request is sent, it will wait until there is an update before returning a response."

The behaviour as described by the async param is what I would expect for an async process.



Hi There,

I never received any followup on the subject. We’ve been living with the “wait until response or timeout” for now as we had to move on. I did not notice the “long-poll” statement on the endpoint documentation, so the behaviour was extra confusing to me at the time…

At least I know I’m not alone now!



I’m curious about this one too.

I don’t see the point of having /auth with async while /auth_status is not asynchronous. I’d expect the API call /auth_status to return immediately everytime even if the status is the same.

I’m doing the same thing as Sean. I implemented a short timeout.