This page explains how to integrate LiveMinutes into your web applications.
This API follows the same philosophy as LiveMinutes, we want to make it simple and beautiful (as much as an API can be beautiful!).
Here are the key principles:
- 1.Interaction on LiveMinutes happens in Sessions, between Participants. One User can be a Participant in several Sessions.
- 2.With this API, you can create your own Sessions, and add your Users to a Session as Participants.
- 3.The API methods allow you to:
- a.Create a Session ABC (use your own session ids or ask us to create one for you)
- b.Add your users 123 and 456 as participant (use your own user ids)
- c.For each participant, we provide a unique URL to follow to enter the session. You can then redirect your users to this URL, or use IFRAMES, or else.
- d.Query the status of a given Session or a Given Participant
- 4.The Calls are made by simple HTTP POST, in your favorite langage, with a simple authentication.
- 5.This API is in beta, is free, and limited to 1000 users and 10000 sessions. Users created with the API are standard LiveMinutes users. If you wish to create your own users, please contact us for pricing terms. If you wish to increase your limits just let us know.
- 6.To get started, please contact us to request your API Key!
1. Authorization
All requests to REST API require you to authenticate using HTTP basic auth to convey identity.
The username is AccountSid. The password is your AuthToken. Your AccountSid and AuthToken are created when signing up an API client.
AccountSid: trw76p0066423
AuthToken: eurn568nfkkg9862iomdnnv987iir
Example:
- With PHP
curl_setopt($ch, CURLOPT_USERPWD, $pwd="{$accountSid}:{$authToken}");
- With Python
import base64
base64string = base64.encodestring('%s:%s' % (username, password))[:-1]
req.add_header("Authorization", "Basic %s" % base64string)
- With C#
private AuthenticationHeaderValue CreateBasicAuthenticationHeader(string username, string password)
{
return new AuthenticationHeaderValue(
"Basic",
System.Convert.ToBase64String(
System.Text.UTF8Encoding.UTF8.GetBytes(
string.Format("{0}:{1}", username, password)))
);
}
var accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXX";
var authToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
var targeturi = "http://api.liveminutes.com/";
var client = new System.Net.Http.HttpClient();
client.DefaultRequestHeaders.Authorization = CreateAuthenticationHeader("Basic", accountSid, authToken);
2. Methods
a. createMeeting
Resource URL: http://api.liveminutes.com/createMeeting
| meetingKey |
|
required |
String |
Length >= 0 |
| hostid |
user id on client |
required |
String |
Length <= 50 |
| title |
title |
optional |
String |
|
| lang |
language |
optional |
String |
|
| description |
|
optional |
String |
|
| time |
time start |
optional |
String |
yyyy-MM-dd HH:mm:ss |
| duration |
|
optional |
float |
|
| hostnickname |
|
optional |
String |
|
| hostemail |
|
optional |
String |
|
Response:
Type: JSON
Example:
{
"resultcode":1,
"meetingKey":"kjhgngf",
"meetingUrl":"http:\/\/liveminutes.com\/03P23Z",
"hostUrl":"http:\/\/liveminutes.com\/e\/LIVEXP63FCLCRJW4GHT1X7O6"
}
If resultcode = 0 => authen failed (acc id or acc token wrong) or not yet create meeting
b. addParticipant
Resource URL: http://api.liveminutes.com/addParticipant
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
| puid |
user id |
required |
String |
Length <= 50 |
| nickname |
username |
optional |
String |
Length >= 0 |
| email |
user email |
optional |
String |
Length >= 0 |
Response:
Type: JSON
Example:
{
"resultcode":1,
"meetingKey":"abcdef",
"participantUrl":"http:\/\/liveminutes.com\/e\/LIVE5CGOSIHYSBEPON0GCGFX"
}
If resultcode = 0 => failed
c. getParticipantUrl
Resource URL: http://api.liveminutes.com/getParticipantUrl
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
| puid |
user id |
required |
String |
Length <= 50 |
Response:
Type: JSON
Example:
{
"resultcode":1,
"participantUrl":"http:\/\/liveminutes.com\/e\/LIVESFK4G5ZJN4U6S0R4R8YX"
}
If resultcode = 0 => failed
d. getMeetingUrl
Resource URL: http://api.liveminutes.com/getMeetingUrl
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
Response:
Type: JSON
Example:
{
"resultcode":1,"meetingUrl":"http:\/\/liveminutes.com\/MNADI4"
}
If resultcode = 0 => failed
e. cancelMeeting
Resource URL: http://api.liveminutes.com/cancelMeeting
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
Response:
Type: JSON
Example:
{
"resultcode":1,"meetingKey":"abcdef"
}
If resultcode = 0 => failed
f. cancelParticipant
Resource URL: http://api.liveminutes.com/cancelParticipant
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
| puid |
user id |
required |
String |
Length <= 50 |
Response:
Type: JSON
Example:
{
"resultcode":1,"meetingKey":"abcdef"
}
If resultcode = 0 => failed
g. getMeetingStatus
Resource URL: http://api.liveminutes.com/getMeetingStatus
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
Response:
Type: JSON
Example:
{
"resultcode":1,"status":"1"
}
Status here is idlastbookingstatus of table lesson.
| 1 |
Start |
| 8 |
in progress |
| 12 |
finish |
| 11 |
host quited |
If resultcode = 0 => failed
h. getParticipantStatus
Resource URL: http://api.liveminutes.com/getParticipantStatus
| meetingKey |
meeting key |
required |
String |
Length >= 0 |
| puid |
user id |
required |
String |
Length <= 50 |
Response:
Type: JSON
Example:
{
"resultcode":1,"status":"1"
}
Status here is idlastparticipantstatus of table participant.
| 2 |
Accept |
| 3 |
refuse |
| 10 |
in progress |
| 11 |
quit |
If resultcode = 0 => failed