User Tools

Site Tools


api:employee:createauthenticatorkey

API : Employee Create Authenticator Key

Introduction

This request will create a new authenticator key for using 2FA and replace the existing one.

Only the user self may call this API,

When logging in for the first time, if no key exists one will be auto-generated and presented to the user.

Request

URL https://api.telecomx.dk/employee/EMPLOYEE_ID/authenticatorkey/create
Method POST
Access level Only the user who is EMPLOYEE_ID.
Param EMPLOYEE_ID Id of the employee (24 hex-char string)

Request example

POST https://api.telecomx.dk/employee/1234567890ABCDEF1234578/authenticatorkey/create

Response

Json object
success Boolean True on success.
key String The newly created key.
totp String The key in TOTP format,

Example

{
  success: true,
  key: '1234567890124567890ABCD',
  totp: 'otpauth://totp/TelecomX:name@email.com?secret=1234567890123456780ABCD&issuer=TelecomX'
}

Errors

Error code Message Description
404 id Employee not found
409 id Key cannot be created when authenticator validation is not enabled
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/employee/createauthenticatorkey.txt · Last modified: 2021/09/08 12:25 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki