Password¶
Send reset password link¶
/send_reset_password_linkUsed to email a password reset link to the account owner. The link opens /board/reset?token=<token>.
Request¶
Auth: None · Content-type: application/json
Request body:
The request body is JSON.
| Field name | Description | Type |
|---|---|---|
| Email address of the account | str |
Request example:
Response¶
{
"success": "Reset password link has been sent to the user (user@example.com). Please follow the instructions in the email."
}
Unknown email address:
Reset password¶
/reset_passwordUsed to set a new password with the token from the reset link. The token is cleared after use.
Request¶
Auth: None (uses the reset token) · Content-type: application/json
Request body:
The request body is JSON.
| Field name | Description | Type |
|---|---|---|
| token | Token from the reset link | str |
| password | New password | str |
Request example:
{
"token": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5",
"password": "new_secure_password"
}
Response¶
Unknown or already used token:
Change password¶
/update/passwordUsed by a logged-in user to change their password. The current password must be supplied.
Request¶
Auth: api_key · Content-type: application/json
Request body:
The request body is JSON.
| Field name | Description | Type |
|---|---|---|
| current_password | The current password | str |
| new_password | The new password, at least 6 characters | str |
Request example:
https://spoilerinterface.com/interface/update/password?api_key=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Response¶
Possible failed messages: New password must be at least 6 characters., Current password is incorrect, Failed to change password.