This API is used to set a new password on an account using the token from a reset link.
The link - from Reset, or the mail sent by the hacked e-mail list - is valid for 30 minutes and can be used once. token and password must be strings. The new password must differ from the current one, and passwordChangedAt is set on the employee.
| URL | https://api.telecomx.dk/auth/setpassword | |
|---|---|---|
| Method | POST/GET | |
| Body/Query | token | Reset link token. |
| password | New password consisting of at least 8 lowercase/uppercase/digits. | |
{
token: 'dhsy23yh9uewhvoewb0fh08wqhenbovu2he08whbvoeh08vjh0ien0eqj-dnqwpifwrvda',
password: 'secret'
}
| JSON object | |||
|---|---|---|---|
| Property | Type | Description | Extended |
| success | Boolean | True on success | |
{ success: true }
| Error code | Message | Description |
|---|---|---|
| 403 | account | Account disabled |
| 403 | username | Employee is using 2-factor authentication (SMS with a number, or an authenticator that is set up) |
| 403 | webauthn_only | Passkey authentication is required |
| 422 | token | Invalid token |
| 422 | password | Password does not meet the required complexity. |
| 422 | password | The new password is the current password (check same). |
| 500 | internal_error | Internal server error |