> For the complete documentation index, see [llms.txt](https://api-documentation.autoshares.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-documentation.autoshares.dev/rest-api/trading-api/password-reset/1.-reset-traders-password.md).

# 1. Reset Trader's Password

## Introduction

This POST endpoint enables you to reset a trader's password. Overall, there are three steps to resetting passwords in Autoshares Trader and this is the first step.

There are three required parameters that must be provided in the request:

1. **Et-App-Key** (header). This is the unique key of your app that identifies your app when communicating with our service. Contact your administrator to get this key.
2. **API version** (path). Unless necessary, leave it at "1.0".
3. **resource** (body). This is a JSON file that contains the login of the trader whose password must be reset as well as the answer to the secret question (if there is any).

### Request Body

The body of this request represents two parameters:

| Parameter            | Description                                                                                                                             |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| User                 | This is the login of the trader.                                                                                                        |
| SecretQuestionAnswer | This is the answer to the trader's secret question. If a trader has not selected a secret question during sign-up, omit this parameter. |

```javascript
{
  "User": "robert.zak",
  "SecretQuestionAnswer": "Peterson" //Optional
}
```

Here's the final template for this API request:

```
POST apiURL/v1.0/users/password/reset
```

## Response

In response to this API request, you will receive a JSON file either confirming successful password reset or enumerating errors that occurred in the process.

```
{
  "Errors": [],
  "IsSucceed": false
}
```

Also, at this point the trader will have received the confirmation code via email which they will have to use during the [second step](/rest-api/trading-api/password-reset/2.-generate-a-token-for-a-new-password.md) of the password reset password.

## Common Mistakes

Here are some of the common mistakes that developers make when attempting to reset a trader's password.

### Failing to Specify the Et-App-Key Parameter

If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:

```javascript
{
    "error": "Application key is not defined or does not exist"
}
```

### Failing to Specify the SecretQuestionAnswer Parameter

Another common mistake when making this request is failing to specify SecretQuestionAnswer parameter. Doing so will result in the following error message:

```javascript
{
  "Errors": [
    "Answer is incorrect, try again."
  ],
  "ErrorsCode": [
    "ErrorIncorrectAnswer"
  ],
  "IsSucceed": false
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api-documentation.autoshares.dev/rest-api/trading-api/password-reset/1.-reset-traders-password.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
