Reset password
Using this endpoint the user will be able to reset his password and after that he will be logged in (and the token will be returned).
info
This operation does not require authentication.
HTTP Request
POST /api/v2/account/reset/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
validation_code | body | string | true | The code found in the email generated by Recover an account endpoint |
password | body | string | true | The new password of the user. The password must be at least 8 characters (max 128 chararacters) and it must contains at least 3 of the following 4 types of characters: lower case letters, upper case letters, numbers and special characters (eg !@#$%^&) |
Example Request
- JavaScript
- Bash
const inputBody = '{
"validation_code": "string",
"password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/v2/account/reset/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X POST /api/v2/account/reset/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
-d '{
"validation_code": "string",
"email": "string"
}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Inline |
Response Schema
Status Code 200
Name | Type | Restrictions | Description |
---|---|---|---|
token | Token | none | Token fields |
Example responses
- 200
{
"token": {
"access_token": "string",
"expires_in": "integer",
"token_type": "string",
"refresh_token": "string",
"client_id": "string",
"scope": "string"
}
}