api:auth:impersonate
Table of Contents
API : Authentication : Impersonate
Introduction
Used to temporarily login as another user. It can be used by resellers to see exactly the same things as their customers etc.
Request
| URL | https://api.telecomx.dk/auth/impersonate/EMPLOYEE_ID | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER if customer belongs to the reseller. RESELLER_ADMIN ADMIN |
|
| Query | ip | [optional] The IP-address the client is at. If this IP is given, then the token returned will only be valid when requests come from the given IP. |
Query example
https://api.telecomx.dk/auth/impersonate/1234567980ABCD1234567890?token=DGEFYFEEIGHJVNEWJCF&ip=50.40.30.20
Response
| Property | Type | Description |
|---|---|---|
| token | String | Token to present on all future requests. |
| expiresInMinutes | Number | Number of minutes the token will be valid, default 15 and -1 if persist was used. |
| employee | Id | Id of the employee the token belongs to |
| customer | Id | Id of the customer the employee belongs to |
| accessLevel | String | The employees access level (see employee for access levels) |
| name | String | Name of employee |
| language | String | The language selected by the employee |
| customerName | String | Name of the customer the user belongs to |
| customerFeatures | Array | List of features in the TelecomX platform that the customer has access to. The available features are: |
| CUSTOMER - Basics, addresses, financial, usage limits, employees | ||
| SIP - SIP trunks | ||
| MVNO - Mobile phones | ||
| PBX - Hosted PBX | ||
| TCE - Telecom Call Enhancer | ||
| DNS - Domain management | ||
| INTERNET - Fiber & xDSL | ||
| IPTVPRIVATE - TV for private | ||
| IPTVBUSINESS - TV for commercial | ||
| FLEXCARE - Healthcare | ||
| EXTERNAL_LICENCES - Also license management | ||
| customerIntegrations | Object | Integrations to third-party systems. Omitted if the user is not a reseller |
| customerIntegrations.billing | Object | Contains billing integrations |
| customerIntegrations.billing.economic | Object | Integration for visma e-conomic (only relevant for resellers) |
| customerIntegrations.billing.economic.enabled | Boolean | True if the integration is enabled, default false. |
| customerIntegrations.billing.rackbeat | Object | Integration for rackbeat (only relevant for resellers) |
| customerIntegrations.billing.rackbeat.enabled | Boolean | True if the integration is enabled, default false. |
| customerIntegrations.licences.also | Object | Integration for Also (only relevant for resellers) |
| customerIntegrations.licenses.also.enabled | Boolean | True if the integration is enabled, default false. |
| customerIntegrations.ms365 | Object | Integration for Also (only relevant for resellers) |
| customerIntegrations.ms365.enabled | Boolean | True if the integration is enabled, default false. |
| customerIntegrations.mvnoPrivate | Object | Integration for Also (only relevant for resellers) |
| customerIntegrations.mvnoPrivate.enabled | Boolean | True if the integration is enabled, default false. |
| reseller | String | Id of the reseller the customer (of the user) belongs to. |
| accountingSystemId | String | Id of customer in 3rd party system. |
| employeeFeatures | Array | List of features the employee has access to: |
| PLAYMAKERSTATUS - access to PlayMaker support site. | ||
| DASHBOARD_EDITOR - permission to edit own PBX dashboards. | ||
| HUMAN_TASK - access to human tasks | ||
| COMMUNICATOR_DEBUG - access to perform debugging in Communicator. | ||
| PORTING - ResellerAdmin has access to Porting | ||
| TELE - ResellerAdmin has access to telecom management | ||
| TV - ResellerAdmin has access to to IPTV management | ||
| FINANCE - ResellerAdmin has access to finance management | ||
| FLEXCARESWAP - permission to perform FlexCare Swap | ||
| recordingMode | String | Current call recording mode: ALWAYS - all calls are recorded, DEMAND - only record when requested, NEVER - cannot record. (requires PBX). |
| skin | String | Name of skin to apply in apps (requires PBX). |
| impersonatedBy | Id | Id of the user who is currently impersonating the logged in user, if impersonation is in use. |
| communicatorAccess | Boolean | True if user has access to Communicator. (requires PBX). |
| recordingAccess | Boolean | True if user has permission to record calls. (requires PBX). |
| recordingRetension | Number | Number of days recordings are kept. (requires PBX). |
Example
{ token: '...', expiresInMinutes: 15, employee: '1234567890ABCDEF12345678', language: 'da', customer: 'ABCDEF123456789012345678', name: 'Donald Duck', accessLevel: 'MANAGER', customerName: 'Northwind Industries', customerFeatures: ['CUSTOMER','SIP','MVNO'], customerIntegrations: { billing: { economic: { enabled: true }, rackbeat: { enabled: true } }, licenses: { also: { enabled: true } }, ms365: { enabled: true }, mvnoPrivate: { enabled: true } }, reseller: '123457890ABCDEF12345678', accountingSystemId: '646254r6253563tgbcbn', employeeFeatures: [ 'DASHBOARD_EDITOR' ], recordingMode: 'NEVER', skin: 'EARTH', impersonatedBy: '12345678901234567890DEDE', communicatorAccess: true, recordingAccess: false, recordingRetension: 0 }
Errors
| Error code | Message | Description |
|---|---|---|
| 401 | credentials_invalid | The supplied username and/or password is invalid |
| 401 | account_disabled | The users account has been permanently disabled, login is not possible |
| 422 | ip | IP is invalid |
| 500 | internal_error | Internal server error |
api/auth/impersonate.txt · Last modified: 2025/03/19 12:51 by Per Møller