omNovia Users Management API Documentation
This is the users' management API. It allows you to add, update, and remove users from the omNovia database.
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 department. They will provide you with the company information.
API Methods
Add UserUpdate 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 //Company ID provided by omNovia SalesSample Code:
(str) companyPassword //Company Password provided by omNovia Sales
(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
<?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 SalesSample Code:
(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
<?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
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 SalesSample Code:
(str) companyPassword //Company Password provided by omNovia Sales
(str) email //User e-mail
<?php
// function to delete Existing User account from omNovia Databasefunction 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"; } }
?>


