<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008G7VR4SANOkta Classic EngineAdministrationAnswered2025-08-09T09:00:28.000Z2017-07-31T13:12:05.000Z2017-07-31T13:12:05.000Z
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


  • 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
    Expand Post
This question is closed.
Loading
Error submitting Forgot Password request via API