Reset password
Reset account password
- HTTP Method:
POST
- URL:
https://example.domain.tld/api/v1/auth/password/reset/
- Require authentication:
No
Request parameters
Parameter |
Type |
Description |
Required |
username |
str |
Your account username |
Required |
new_password |
str |
New password for account |
Required |
recovery_code |
str |
Recovery code |
Required |
Response parameters
Parameter |
Type |
Description |
username |
str |
Your account username |
message |
str |
Reset message |
status |
str |
Reset status |
Example request (Python)
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/auth/password/reset/"
data = {
"username" : "admin",
"new_password" : "CWObMVZO71cuSDVWsdq5",
"recovery_code" : "EOlHeamRuyLYROEggB4nRf5X8JGVlFGkV5TAREcw5lMPi0cr5u"
}
r = requests.post(url, json=data)
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)
{'message': 'Password reset successfully',
'status': 'success',
'username': 'admin'}