API v2

From Megawiki

Jump to: navigation, search

Note: This document is a work in progress. MegaMeeting employees do not train on, nor support the API.

The MegaMeeting API (application programming interface) is used to integrate other applications, services, or web pages with the MegaMeeting service. It allows many common tasks to be automated.

Contents

URL Options

Using URL options, you can perform simple tasks (example: automatically send a guest to the guest connect page by using a special hyperlink). None of the URL parameters below are required, they are optional. The complete list of parameters follows:

  • agree - Values: 0,1 - Use &agree=1 to indicate that the guest has agreed to the licensing and terms of service already. This is useful of these same agreements are used in another place on your website.
  • conid - Sample Value: TestMeeting - Use &conid=TestMeeting to automatically select a meeting previously created which was titled TestMeeting when joining as a guest.
  • page - Values: guest,host - Use &page=guest to automatically select Guest at the welcome screen. Use &page=host to automatically select Host at the welcome screen.
  • port - Common Values: 1935,80,443 - Use &port=80 to set the flash client's preferred port to 80. If the flash client cannot connect on the port specified here, it will try other common ports automatically. You can use any port, but MegaMeeting servers are commonly only configured to use 80, 443, and 1935.
  • reload - Values: 0,1 - Use &reload=1 to hide all user interface elements from view until the user is in the meeting. This is used for automatically connecting guests and hosts without displaying the various screens the program navigates on the way to the meeting.
  • rtmp - Values: rtmp://,rtmpt://,rtmps:// - Use &rtmp=rtmpt to set the flash client's preferred protocol to tunneling. If the flash client cannot connect using the specified protocol, it will try other port/protocol combinations automatically. Use rtmps for SSL encrypted communication (restricted to port 443 only). Use rtmp for the fastest transmission of data.
  • session - See #createSession. Used to indicate which "host session token" to use.
  • user - Sample Value: Joe - Use &user=Joe to set the User Name of the guest.

Example usage: http://demo.megameeting.com/?page=guest&conid=TestMeeting&user=Joe&agree=1&reload=1&port=80
http://demo.megameeting.com/?session=563f6680-ca94-4525-9ca3-d720aae1ff08

Web Service WSDL and HTTP Requests

To use the web service we have created for our customers, you may need the SOAP RPC WSDL(Remote Procedure Call, Web Services Description Language) document. The WSDL is located here: http://reports.megameeting.com/cfc_api/MainService.cfc?WSDL

SOAP is not required for interacting with our web service. You can also access the service using http requests. Here is a sample http request: http://reports.megameeting.com/cfc_api/MainService.cfc?method=testLogin&domainname=demo.megameeting.com&username=User1&userpassword=Password1

You can use the response to create custom interaction for your users. If you view the source of the web page above you will see this response:

<?xml version="1.0" encoding="UTF-8"?>
<response>
	<success>false</success>
	<message>Invalid login</message>
	<result/>
</response>

MainService Method List

Here is a complete list of public methods found in MainService.cfc. Each requires a different list of parameters which we will explain in detail below.

createLogin
createMeeting
createSession
deleteLogin
deleteMeeting
deleteRecording
getMeetings
getRecordings
getSettings
logRegistrationSent
testLogin
updateLogin
uploadContacts

createLogin

Creates a new login using the parameters specified. The details of the login created is returned. This method requires administrator access.

Arguments:

domainname - The domain of the account. String Max:50 Default:""
adminusername - Administrator User Name. String Max:50 Default:""
adminpassword - Administrator Password. String Max:20 Default:""
username - New user name. String Max:50 Default:"newuser"
userpassword - Password for the new user. String Max:20 Default:""
useremail - Email address of the new user. String Max:200 Default:""
userattendees - Number of users per meeting. Number Default:2

Example Input:

http://reports.megameeting.com/cfc_api/MainService.cfc?method=createLogin
&domainname=YOURDNS.megameeting.com&adminusername=YOURUSERNAME
&adminpassword=YOURPASSWORD&username=NewUser&userpassword=Password1
&useremail=newuser@yourdomain.com&userattendees=5

This method will fail under the following conditions:

  • One of the required arguments was not passed.
  • The domainname, adminusername or adminpassword is incorrect. Message: Invalid login
  • The userattendees number is higher than the number of seats allowed for the account. See your representative to increase this number. Message: Error, userattendees is higher than maximum attendees for the administrator.
  • The username already is in use. Message: Error, user already exists.

If the API call is successful, the service will return the login record.

Example Output:

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <success>true</success>
    <message/>
    <result>
        
        <login>
            <username>NewUser</username>
            <password>Password1</password>
            <email>newuser@yourdomain.com</email>
            <attendees>5</attendees>
        </login>
                        
    </result>
</response>

Alternate Example Output:

<?xml version="1.0" encoding="UTF-8"?>
<response>
	<success>false</success>
	<message>Error, user already exists.</message>
	<result/>
</response>

createMeeting

This method (createMeeting) generates a new meeting which can be joined by Hosts (via createSession) and Guests (via URL Parameters). It returns the details of the meeting created in XML format. It requires host level permissions, and a unique meeting name

Arguments:

domainname - The domain of the account. String Max:50 Default:""
username - Host level login user name. String Max:50 Default:""
userpassword - Host login password. String Max:20 Default:""
meetingname - The unique name of this new meeting. Accepted input: English letters (A-z) numbers (0-9) and underscores (_). String Max:50 Default:"newmeeting"
creationdate - The date and time the meeting was created. Defaults to now. Accepted format: MM/DD/YYYY HH:MM Default: (Current date and time of the server)
scheduleddate - The date and time the meeting will be taking place. Defaults to now. Accepted format: MM/DD/YYYY HH:MM Default: (Current date and time of the server)
meetingpassword - The password all guests and hosts must enter when joining this meeting. Leave empty for no password required. Accepted input: English letters (A-z) numbers (0-9) and underscores (_). String Max:50 Default: ""
autoaccept - 
hoststreaming
persistentchat
showonline
fmsprotocol
teleconferencing
teleconferencing_mode
teleconferencing_call_in
teleconferencing_moderator_code
teleconferencing_attendee_code
videorate
videoresolution
videocompression
streamoptions
collectemailaddress
collectphonenumber
hideuserlist
registration







useremail - Email address of the new user. String Max:200 Default:""
userattendees - Number of users per meeting. Number Default:2

Example Input:

http://reports.megameeting.com/cfc_api/MainService.cfc?method=createLogin
&domainname=YOURDNS.megameeting.com&adminusername=YOURUSERNAME
&adminpassword=YOURPASSWORD&username=NewUser&userpassword=Password1
&useremail=newuser@yourdomain.com&userattendees=5

This method will fail under the following conditions:

  • One of the required arguments was not passed.
  • The domainname, adminusername or adminpassword is incorrect. Message: Invalid login
  • The userattendees number is higher than the number of seats allowed for the account. See your representative to increase this number. Message: Error, userattendees is higher than maximum attendees for the administrator.
  • The username already is in use. Message: Error, user already exists.

If the API call is successful, the service will return the login record.

Example Output:

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <success>true</success>
    <message/>
    <result>
        
        <login>
            <username>NewUser</username>
            <password>Password1</password>
            <email>newuser@yourdomain.com</email>
            <attendees>5</attendees>
        </login>
                        
    </result>
</response>

Alternate Example Output:

<?xml version="1.0" encoding="UTF-8"?>
<response>
	<success>false</success>
	<message>Error, user already exists.</message>
	<result/>
</response>


createSession

deleteLogin

deleteMeeting

deleteRecording

getMeetings

getRecordings

getSettings

logRegistrationSent

testLogin

updateLogin

uploadContacts

Code Samples

ColdFusion MX
This sample shows the result of getMeetings in the browser. Be sure to replace the argument values with valid data.

  <cfinvoke webservice="http://reports.megameeting.com/cfc_api/MainService.cfc?WSDL"
  method="getMeetings" returnvariable="meetingList" >
     <cfinvokeargument name="domainname" value="yourdomain.megameeting.com">
     <cfinvokeargument name="username" value="yourusername">
     <cfinvokeargument name="userpassword" value="yourpassword">		
  </cfinvoke>
  <cfdump var="#meetingList#">

Flash ActionScript 2.0
This sample shows a list of active meetings in the output panel.

  //This sample shows a list of active meetings in the output panel.
  import mx.remoting.NetServices;
  
  //Connect to the flash remoting gateway
  mmDataServer = NetServices.createGatewayConnection("http://reports.megameeting.com/flashservices/gateway");
  
  //create a callback from the service: returned data
  APIResults = new Object();
  APIResults.onResult = function(info) {
  	trace("MeetingList: ");
  	for (i=1; i<info.length; i++) {
  		trace("   MeetingName: "+info[i].CON_NAME);
  	}
  };
  
  //connect to the web service
  MainService = mmDataServer.getService("cfc_api.MainService", APIResults);
  
  //Call a method, replace the parameters with valid data or this won't work
  MainService.getMeetings("yourdomain.megameeting.com", "yourusername", "yourpassword");

HTML
This sample creates a form to enter your credentials and view your meetings.

  <form action='http://reports.megameeting.com/cfc_api/MainService.cfc' method='post'>
  Your Domain:<input type='text' name='domainname' />
  Your User ID:<input type='text' name='username' />
  Your Password:<input type='password' name='userpassword' /> 
  <input type='hidden' name='method' value='getMeetings' /> 
  <input type='submit' value='Submit Query' /> 
  </form>

PHP
This sample creates a session for the purposes of automatic host login.

  <?php
  define('DOMAIN', 'xyz.megameeting.com');
  define('SOAP_SERVER', );
  define('USERNAME', 'username');
  define('PASSWORD', 'password');
  $MegaMeeting = new SoapClient(SOAP_SERVER);
  $meetingList = $MegaMeeting->getMeetings(DOMAIN, USERNAME, PASSWORD);
  $firstRecord=array_shift($meetingList);
  $sMeetingID = $firstRecord['CON_ID'];
  $sSessionID = $MegaMeeting->createSession( DOMAIN, USERNAME, PASSWORD, $sMeetingID);
  print "SESSION: $sSessionID\n";
  ?>

C# and .NET
We currently have no C# or .NET code samples. If you have any to contribute, please send an email to wikieditors@megameeting.com. Some users have encountered issues using this API with .NET, specifically with the returned results of getMeetings. If you are having issues using SOAP, you can use the service as a simple http request like so:

  http://reports.megameeting.com/cfc_api/MainService.cfc?method=getMeetings&domainname=YOURDOMAIN.megameeting.com&username=ABCD&userpassword=1234
Personal tools