# Db\_connections/change\_password responds with error "email or username are required"

**URL:** <https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755>\
**Category:** Get Help\
**Created:** [October 4, 2021, 2:35pm UTC](https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755 "2021-10-04T14:35:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucas5](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lucas5/32/29268_2.png) [@lucas5](https://community.auth0.com/u/lucas5)\
**Post date:** [October 4, 2021, 2:35pm UTC](https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755/1 "2021-10-04T14:35:23Z")

</div>

Hey, had this issue another user came across - linked below. I’m making a request to the `db_connections/change_password` authentication endpoint exactly as the cURL statement provided in the docs suggests. I am providing an email that is attached to an existing account. Any idea what the issue is?

```auto
curl --url 'https://mydomain.auth0.com/dbconnections/change_password' --request POST --header 'content-type: application/json' -d '{"headers":{"content-type":"application/json"},"data":{"email":"myemail@site.com","client_id":"myClientId123","connection":"Username-Password-Authentication"}}'  

```

> [@Missing 'Back To App' button on Reset Password Success screens (Universal Login)](https://community.auth0.com/t/missing-back-to-app-button-on-reset-password-success-screens-universal-login/53542/5):
>
> Thank you Dan for the fast response. Ive tried that API endpoint you linked to, and even though Im setting client\_id, email, and connection. The API keeps telling me 400 Bad Request (“error”: “email or username are required.”) And Im passing an email for sure. Ill use your link to put in a feature request. Thank you for your help.

---

<div class="post-metadata">

**Author:** ![lucas5](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lucas5/32/29268_2.png) [@lucas5](https://community.auth0.com/u/lucas5)\
**Post date:** [October 4, 2021, 2:40pm UTC](https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755/2 "2021-10-04T14:40:31Z")

</div>

Solved, careless. My curl request has headers and data keys in the data payload, so the actual data is nested a layer deeper than it should be. This means there is no email key at the top layer in the data arg. Oops.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 5, 2021, 1:47pm UTC](https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755/3 "2021-10-05T13:47:11Z")

</div>

Thanks for sharing that with the rest of community!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 20, 2021, 1:48pm UTC](https://community.auth0.com/t/db-connections-change-password-responds-with-error-email-or-username-are-required/70755/4 "2021-10-20T13:48:00Z")

</div>

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