UCaaS API are low-code APIs giving access to EnableX Video Meeting and Webinar Applications and their Provisioning Portal. Using these APIs, developer may quickly integrate Video Meeting in their own Information System/Applications.
Table of Contents
Overview
UCaaS API helps easily integrate Video into Third Party Applications. Here are some interesting key points:
Different Accessibility
UCaaA API may be accessed either of the 2 implemented Authentication Mechanism, depending on how your Application looks to access the API:
- Server-to-Server API Call: UCaaS API are designed for Server-to-Server Call using HTTP Base Authentication. This helps Developers to integrate API Server based Application.
- Client-to-Server API Call: UCaaS API are also designed for Client-to-Server Call using OAuth2 Authentication process. This helps Developers to use API directly to develop Client End Application without having to build a middle-tier API Service to communicate among Client, Application Server and EnableX UCaaS Service. So, this enables Client Application to communicate with EnableX UCaaS Service directly.
Role Based Authorization
Role based access to different API Routes and data there in. API gives access to data in the following hierarchy:
- Administrtors – Role Access to data of Resellers, Customers, Moderators under it.
- Resellers – Role Access to data of Customers, Moderators under it.
- Customers – Role Access to data of Users under it.
- Users – Role Access for own data only
- Customers – Role Access to data of Users under it.
- Resellers – Role Access to data of Customers, Moderators under it.
Basic Functions
- Customer Management
- Subscriptions Management
- User Management
- Meeting Management
- Contacts & Groups Management
- Session Access
API Host URL
API Host: https://api.enablex.io/ucaas/
Every major version release of UCaaS API will have a sub-directory named after the major version number. This is known as Base URL for a Server API Version, e.g.
Version Base URL: https://api.enablex.io/ucaas/v1/
All UCaaS API Routes are mapped to the Version Base URL, e.g.
Customer Route URL: https://api.enablex.io/ucaas/v1/customers
API Authentication
UCaaS API provides 2 different type of Access Mechanism
HTTP Basic Authentication – For Server to Server API Call
The UCaaS API uses HTTP Basic Authentication mechanism to authenticate API calls. Each API call is validated via the authentication header. This suits best to integrate EnableX with Server Side Code. The API Access Credentials be saved on Server and used for Server-to-Server Call.
You need API ACCESS ID and API ACCESS KEY for HTTP Basic Authentication. These are to be used as API Access Credentials from your Application Server in each API Call.
- API ACCESS ID: Use it as username for HTTP Base Authentication
- API ACCESS KEY: Use it as password for HTTP Base Authentication
POST https://api.enablex.io/ucaas/v1/customers Authorization: Basic XXXXXX Content-Type: application/json
The Authorization
header in the above example contains a value XXXXX which is a base64 encoded string of the API ACCESS ID:API ACCESS KEY.
How to get API ACCESS ID & API ACCESS KEY
Every Reseller, Customers may get access to API Access for Application Integration. To get API Access Credentials, follow the given steps:
- Login to EnableX UCaaS Portal
- Navigate: {Main Menu} Developers / API Access
- Click “Generate API Credentials” (If you are first time API User). Subsequently, you will get API Credentials readily available on this page. .
OAuth2 – For Client to Server API Call
The UCaaS API uses OAuth2 Authentication mechanism to authenticate API calls using limited Access Token. Developer must call a “Login” route to get Access Token which will be used for subsequent API Call. Access Token expires in 20 minutes. Developer must call the “Login” route again to get a fresh Access Token for further API Access.
This suits best to integrate EnableX with Client End Application. An Application User uses own login credentials which is used in the “Login” route to get Access Token. This helps Ciient End Point Application development without having to share API Access Credentials in the Client End Code.
POST https://api.enablex.io/ucaas/v1/login Content-Type: application/json X-Api-Id: String /* API Access ID */ { "email": "String", "password": "String" } // Returns { "token": "String" }. Use it for subsequent API Call GET https://api.enablex.io/ucaas/v1/customers Authorization: Token XXXXXXXXXXX Content-Type: application/json
API Responses
The UCaaS API call make use of JSON Result Code to determine if the API call is successful.
Success JSON
Successful UCaaS API calls will always return HTTP 200 with JSON Body having Result Code as result: 1
.
{ "result": "1", "data": { } }
The data
object is optional and its a dummy name. It will be named after requested data and will contain related key-fields.
Error JSON
If unsuccessful, for whatever reason, the UCaaS API will return a JSON with a non—zero result code. An error response in JSON will always carry 3 keys, viz. Result Code, Error, Description. See example below:
{ "result": "1504", "msg": "Duplicate data", "desc": "Email Address is already registered", "data": { "email": "[email protected]" } }
Result Code Grouping
The HTTP Response Codes of UCaaS API are grouped into 5 categories as shown in the table below:
Code | Category | Description |
---|---|---|
1xx | Information | Request received & processed. |
2xx | Success | Request received & accepted. |
3xx | Redirection | Action required to complete Request. |
4xx | Client Error | Illegible Request Syntax. Can’t be fulfilled. |
5xx | Server Error | Server failed to complete a legit Request. |
Error Codes
Common HTTP Status Codes
Code | Description |
---|---|
200 | OK success status: the request has succeeded. |
400 | Header is missing. Add a valid header. |
401 | Invalid header used. |
403 | Token has expired. |
404 | Not Found. |
406 | Unprocessable entity, validation failed. |
500 | Internal Server Error. |
1001 | Token is not valid. |
1002 | The request is invalid. |
Application Specific Common Error Codes
Code | Description |
---|---|
0 | Error. |
1 | Success. |
1401 | App type must be specified. |
1402 | App type must be a string. |
1403 | Only Valid app-type should be passed. |