How to get stateToken to Change Password in Authentication API call? Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmlgqai&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Rupanshu SatsangiRupanshu Satsangi 

How to get stateToken to Change Password in Authentication API call?

I am trying authentication rest apis via postman but when I click on change password under Authentication API

{{url}}/api/v1/authn/credentials/change_password

It asks for stateToken, so please let me know how I will get stateToken so that I can pass stateToken to this rest call.
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Rupanshu
Take a look at the documentation here:
http://developer.okta.com/docs/api/resources/authn.html
You have to make a call to another API to get the stateToken.
Rupanshu SatsangiRupanshu Satsangi
Which API I should use to get stateToken?
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Rupanshu,
Take a look at the diagram and info here:
http://developer.okta.com/docs/api/resources/authn.html#transaction-state
Since it's an "authn" API, every process starts with Primary Authentication /authn, which is here:
http://developer.okta.com/docs/api/resources/authn.html#authentication-operations
The diagram goes from state to state, and that's tracked via stateToken.

To change a user's password without using /authn and states, check these out:
http://developer.okta.com/docs/api/resources/users.html#user-operations
http://developer.okta.com/docs/api/resources/users.html#credential-operations
http://developer.okta.com/docs/api/resources/users.html#lifecycle-operations
 
Rupanshu SatsangiRupanshu Satsangi
Thanks.