User Tools

Site Tools


api:employee:createtoken

API : Employee Create Token

Introduction

This request will create a token, that can be used for M2M communications. The token bearer will have the same access as the employee that it is linked to.

Managers and up can create and delete tokens, but only the employee self may view the token generated.

Request

URL https://api.telecomx.dk/employee/EMPLOYEE_ID/token
Method POST
Access level MANAGER or OWNER if user belongs to the customer of the employee.
RESELLER if customer belongs to the reseller and employee belongs to the customer.
ADMIN.
Param EMPLOYEE_ID Id of the employee (24 hex-char string)

Request example

POST https://api.telecomx.dk/employee/1234567890ABCDEF1234578/token

Response

Json object
success Boolean True on success.
token String The newly created token (only visible for employee herself).

Example

{
  success: true,
  token: '47fgheyfhgfcvwguyigrigiuerwbivebdivfbewuifhbr4934g9fbrewif34789guiewbfi43g897vbu9b79bev279ge249b9e2b'
}

Errors

Error code Message Description
404 id Employee not found
403 id Tokens are not allowed for admins
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/employee/createtoken.txt · Last modified: 2018/06/30 16:27 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki