Sending a password reset API request

I’m adding Auth0 to an Android application and I want to be able to make a change password within the app. I’ve tried following the documentation but I keep getting 400 responses.

I’m using "{auth0_domain}/dbconnections/change_password”

For the body, I found resources online stating that I needed the client_id, email and connection.

I used my user’s client id, which begins with ‘auth0|’ and matches what I see in the auth0 dashboard. The email is my user’s email, easy to verify. My connection is “Username-Password-Authentication”, which is a database that exists in my auth0 app. All requests with these three properties failed.

I found Welcome to Auth0 Docs - Auth0 Docs which says I also need to include an ‘organization’ field. I tried including the application id but the requests are still failing.

Hi @max14

Welcome to the Auth0 Community!

From what you have mentioned regarding the issue, I believe it is caused by the fact that you are using the user’s user_id instead of the client_id of the application. You can find it under Applications → Applications → Client ID.

The standard body would look something like this:

{
  "client_id": "{{Application_ID}}", //Should be something like ZeStcIFXlkFleSBjvfg0SLXoptPtG0wr
  "email": "test_user@test.com",
  "connection": "Username-Password-Authentication"
}

If the request is correct, it should say We've just sent you an email to reset your password.

If you have any other questions, let me know!

Kind Regards,
Nik

1 Like

That was it! Thank you so much.

Glad I could help!

See you around and whenever you have issues, you can let us know!

Kind Regards,
Nik

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