Table of Contents

API : Authentication Request Password Reset

Introduction

This API is used by an un-authenticated user, who has forgotten her password, to request a password reset.

If 2-factor authentication is not used, and the e-mail address exists, an e-mail with a reset link will be sent to the users e-mail address.

The link is valid for 30 minutes. While a link is pending - also one mailed by the hacked e-mail list - no new one is sent (403 time). An expired link is replaced, and a link that could not be sent is removed again, so the request can be repeated at once. username must be a string.

Request

URL https://api.telecomx.dk/auth/reset
Method POST/GET
Body/Query username E-mail address of the account to reset a reset link for.
method Where to send the request to:
EMAIL - for the users e-mail address (default)
SMS for the users mobile phone, with fallback to email.

Query example

{
  username: 'donald@duck.com',
  method: 'EMAIL'
}

Response

JSON object
Property Type Description
success Boolean True on success
method String How the link was sent: EMAIL or SMS.

Example

{
  success: true,
  method: 'EMAIL'
}

Errors

Error code Message Description
401 credentials_invalid Unknown username, or username is not a string
403 account Account disabled
403 username Employee is using 2-factor authentication
403 time A password reset requests already exists, try again in 30 minutes.
500 internal_error Internal server error