> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastgen.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Password Reset

### Overview

Password reset is a crucial process for maintaining account security. This document outlines the steps to verify the status of a password reset, initiate a password reset system event, and successfully submit the token for a seamless and secure recovery of account access.

<Warning>
  Password reset is right now only possible for Email/Password users and not for users that signed up via any of the third party auth providers.
</Warning>

### Requesting password reset

To request a password reset, use the `/auth/user/password/reset/token` endpoint. If successfull, the returned token is valid for one hour.

#### Example Request for Requesting password reset

<CodeGroup>
  ```bash curl theme={null}
    curl --location --request POST 'https://my-project.fastgenapp.com/auth/user/password/reset/token' \
      --header 'Content-Type: application/json' \
      --data '{
        "formFields": [
          {
            "id": "email",
            "value": "spongebob@fastgen.com"
          }
        ]
      }'
  ```

  ```python python theme={null}
  import requests

  url = "https://my-project.fastgenapp.com/auth/user/password/reset/token"
  payload = json.dumps({
    "formFields": [
      {
        "id": "email",
        "value": "spongebob@fastgen.com"
      }
    ]
  })
  headers = {}

  response = requests.request("POST", url, headers=headers, data=payload)
  print(response.text)
  ```
</CodeGroup>

### Submitting Password Reset Token

To submit the verification token received in the email, use the `/auth/user/password/reset` endpoint.

#### Example Request for Submitting Verification Token

<CodeGroup>
  ```bash curl theme={null}
    curl --location --request POST 'https://my-project.fastgenapp.com/auth/user/password/reset' \
      --header 'Content-Type: application/json' \
      --data '{
        "formFields": [
          {
            "id": "password",
            "value": "<mySecretPassword1>"
          }
        ],
        "token": "OGY0NzE0ZWQxMDhiODhiMWFlOGZjOWFkZWJkYWZjNzM2MWI5M2M1YzExMDRlYWFhYTJjNDRiMDMxZWU5ZmE5YWYxNzcyM2RmNjRjODc5ZWFjOGM5ZTRmZGQ3YjgxM2Ri"
      }'
  ```

  ```python python theme={null}
  import requests

  url = "https://my-project.fastgenapp.com/auth/user/password/reset"
  payload = json.dumps({
    "formFields": [
      {
        "id": "password",
        "value": "<mySecretPassword1>"
      }
    ],
    "token": "OGY0NzE0ZWQxMDhiODhiMWFlOGZjOWFkZWJkYWZjNzM2MWI5M2M1YzExMDRlYWFhYTJjNDRiMDMxZWU5ZmE5YWYxNzcyM2RmNjRjODc5ZWFjOGM5ZTRmZGQ3YjgxM2Ri"
  })
  headers = {}

  response = requests.request("POST", url, headers=headers, data=payload)
  print(response.text)
  ```
</CodeGroup>
