Retrieve the current Authn transation state of a given stateToken


I’m using the Auth SDK Java library to transit through the authentication states. What is the method to retrieve the current transaction state of a given stateToken - Authentication | Okta Developer.


Hey @dcao!

To answer your question, you can just call: client.authenticate(),
NOTE: It’s usage is a bit overloaded (IIRC, the endpoint you are asking about, was published after this SDK was created).

And call it with something like:

AuthenticationRequest request = client.instantiate(AuthenticationRequest.class);
request.put("stateToken", "<you-state-token-value>");

AuthenticationResponse response = client.authenticate(request, yourStateHandlerOrNull);

What are you trying to do? Which framework are you using? Maybe we can give you a more specific answer or an example we can point you to?

1 Like

@bdemers Thanks for the rely!

I’m trying to support Okta Voice Call with our custom UI. Since I allow the user to keep trying with different phone numbers (valid or invalid) during enroll and activate enroll states, I want to know the current state to decide if I can resend, or move back to previous state to enroll with a new phone number, or can just enroll right away.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.