Users API (XML-RPC)

omNovia Users Management API Documentation 

This is the users’ management API. It allows you to add, update, and remove users from the omNovia database.

Note: You will need to have a skilled web programmer who has a strong knowledge of programming languages such as PHP in order to implement these APIs.

First add the user; then add the room access. You must know the roomID. More details are available inside the function “updateRoomAcccess”.

NOTE: Please review the SSO API. Using SSO, you can have your customers in your own database and set your own login rules.
To enable the API, please contact omNovia Sales.

NOTE: You must include the library for XML-RPC into your code.
 (More information here: http://pear.php.net/package/XML_RPC)

API Methods

Add User
Update Room Access
Delete User
Execute

Add User

Using this function, you are able to add users. Please see the example below in the sample code section.

After adding the user use the function “updateRoomAccess” to grant access to the room(s) and add the user role.

Parameters required:

(int) companyID           //Found in Modify Organization Settings section of the admin page
(str) companyPassword //Found in Modify Organization Settings section of the admin page
(str) firstName //User First Name
(str) lastName //User Last Name
(str) email //User e-mail
(str) userPassword //User password
(int) sendEmail //Send email to user or not

Sample Code:

<?php

// Add new user account to the omNovia Database function addUser() { $sendemail = 1; //set to 1 if you want to send an email to the user, 0 to not send email $userpassword = ""; //set the user's login password - if blank we will generate one //You have to create this array in this order $addUserParams = array ( new XML_RPC_Value(2466, "int"), //companyID new XML_RPC_Value("easy", "string"), //companyPassword new XML_RPC_Value("TestFirstname", "string"), //firstName new XML_RPC_Value("TestLastname", "string"), //lastName new XML_RPC_Value("user@domain.com", "string"), //email new XML_RPC_Value($userpassword, "string"), //user password new XML_RPC_Value($sendemail, "int")); //send email to user or not. execute('user.rpcAddUser', $addUserParams); }
?> 

Update room access

Using this function you are able to add, update, or delete access to a room for an existing user.

Parameters required:

(int) companyID         //Company ID provided by omNovia Sales
(str) companyPassword //Company Password provided by omNovia Sales
(int) roomID //Provided by omNovia
(str) email //User e-mail
(int) sendEmail //Send email to user or not
(int) role //role=0 - no room access
//role=1 - registered user
//role=2 - presenter
//role=3 - moderator
//other values will result in creating a user with no room access
(int) roomAdmin //0 = no room admin access, 1 = has room admin access. Can be 1 only for roles 2 and 3.

Sample Code:

<?php

// adds access to a room for an existing user // or updates it // or removes it (if role is 0) function updateRoomAccess() { //You have to create this array in this order $updateParams = array ( new XML_RPC_Value(2466, "int"), //companyID new XML_RPC_Value("easy", "string"), //companyPassword new XML_RPC_Value("testuser@yourdomain.com", "string"), // email new XML_RPC_Value(2623, "int"), //roomID new XML_RPC_Value(3, "int")); //role: 0, 1, 2 or 3
new XML_RPC_Value(1, "int")); //roomAdmin: 0 or 1
execute('user.rpcUpdateRoomAccess', $updateParams); }
?>

Delete User

This method allows you to delete a user from the database.

Parameters required:

(int) companyID           //Company ID provided by omNovia Sales
(str) companyPassword //Company Password provided by omNovia Sales
(str) email //User e-mail

Sample Code:

<?php
// function to delete Existing User account from omNovia Database
function deleteUser()
function deleteUser(){
//You have to create this array in this order
$deleteUserParams = array (
new XML_RPC_Value(2466, "int"), //companyID
new XML_RPC_Value("easy", "string"), //companyPassword
new XML_RPC_Value("testuser@omnovia.com", "string")); //email

execute('user.rpcDeleteUser', $deleteUserParams);}
?>

Function execute

Sample code 

<?php
function execute($method, $params) { $msg = new XML_RPC_Message($method, $params); $client = new XML_RPC_Client('/rpc/userApi.php', 'https://www.omnovia.com'); $client->setDebug(0); // enable this to see detailed debugging logs of the call $resp = $client->send($msg, 5); if(!$resp) { echo 'Communication error: ' . $client->errstr; exit(); } if(!$resp->faultCode()) { $val = $resp->value(); $data = XML_RPC_decode($val); print $data; } else { echo 'Fault Code: ' . $resp->faultCode() . "\n"; echo 'Fault Reason: ' . $resp->faultString() . "\n"; } }
?> 
Top
Top
WordPress Lightbox Plugin