# Change password

{% hint style="info" %}
**Must have the authorization to use this API**
{% endhint %}

<mark style="color:blue;">`GET`</mark> `https://example.com/wp-json/rimplenet/v1 /reset-password`

fire\_email is optional. In a case where it is used, it must be true or false. When it is true, a token is sent to the email address provided and when false, a token is returned in the response.

#### Request Body

| Name                                             | Type   | Description                    |
| ------------------------------------------------ | ------ | ------------------------------ |
| email\_address<mark style="color:red;">\*</mark> | String | Email address to receive mail  |
| fire\_email                                      | Bool   | Should be either True or False |

{% tabs %}
{% tab title="200: OK Token Generated" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Token Generated",
    "data": {
        "token_to_change_password": "fd398a",
        "mail": false
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To view request params, click on the arrow (>) at the right-hand side of the endpoint url to expand or collapse
{% endhint %}

**Sample response**

{% tabs %}
{% tab title="200 Ok" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Token Generated",
    "data": {
        "token_to_change_password": "fd398a",
        "mail": false
    }
}
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `https://example.com/wp-json/rimplenet/v1 /reset-password`

#### Request Body

| Name                                                           | Type       | Description                                                                  |
| -------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------- |
| email\_address<mark style="color:red;">\*</mark>               | String     | Email address                                                                |
| current\_password <mark style="color:red;">\*</mark>           | String/int | Current password                                                             |
| new\_password<mark style="color:red;">\*</mark>                | String/int | New intended password                                                        |
| confirm\_password <mark style="color:red;">\*</mark>           | String/int | Confirm new password                                                         |
| token\_to\_change\_password <mark style="color:red;">\*</mark> | String/int | Provide token sent to mail or token contained in the GET response from above |

{% tabs %}
{% tab title="200: OK Password successfully changed" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Password Changed Successfully",
    "data": null
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To view request params, click on the arrow (>) at the right-hand side of the endpoint URL to expand or collapse
{% endhint %}

​

**Sample response**

{% tabs %}
{% tab title="200 OK" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Password Changed Successfully",
    "data": null
}
```

{% endtab %}
{% endtabs %}

​

​

​

​

​

​
