Error submitting Forgot Password request via API Skip to main content
https://support.okta.com/help/answers?id=9062a000000xa6gqas&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:
Mark StevensMark Stevens 

Error submitting Forgot Password request via API

I can generate a reset password email for a user just fine by logging into the Okta admin page and clicking the "Reset Password" button for the user.

When I try to perform the same action using the API I get the error message "Forgot password is not allowed in the user's current status"

The format of my request is as follows:
POST https://rentpathtest.okta.com/api/v1/users/00u1dt0402eZBkJQx0h8/credentials/forgot_password?sendEmail=true HTTP/1.1
User-Agent: Fiddler
Accept: application/json
Content-Type: application/json
Authorization: SSWS *************************************
Host: rentpathtest.okta.com
Content-Length: 0
 
Josh SkeenJosh Skeen (Okta)
Hi Mark,

Looking over the API call that you are using, it appears that the endpoint is correct, but I am not sure what you are using for the "body" of the request.

A normal forgot password request will contain the following in the body (this is from our Postman API client examples):

{
  "password": { "value": "{{password}}" }, 
    "recovery_question": { "answer": "Cowboy Dan" } 
}


If you pass a value like this along to that endpoint, then the password should be reset as expected.

There is actually some great documentation regarding this process here: https://developer.okta.com/docs/api/resources/users.html#forgot-password. Note that the call you are attempting to perform can only be used on users in the ACTIVE status.

Let us know if you have any further questions.

Thank you,

Josh Skeen
Technical Support Engineer