Account API

From Livestream » User Guide

Jump to: navigation, search

The Livestream Account API allows client applications to manage user and channels belonging to a given affiliate. The client application can access Account Management API in a platform-independent, language-independent way. Livestream Account API is a web application running on Http Server supporting both Get and Post methods.

Contents


Audience


This document is intended for programmers who want to write client applications that can access Livestream Account data. The document provides examples of the supported operations using raw HTTP and XML, along with explanations


Prerequisites


Obtaining Affiliate Id and Key from Livestream

In order to query the Livestream API you need to obtain a Livestream API Affiliate ID and Application Key. Please request by sending an email to partnerships@livestream.com providing as much details on your project as possible. Affiliate API Keys can configured by Livestream to filter a specific set of channels, or even to provide a private channel group.

Required Knowledge and skills

1. XML

2. Basic understanding of REST

3. Any programming language.

Categories


The API provides a method getCategories to retrieve the list of Livestream categories as an XML. The category ID returned in the XML can be used to set the channel category in the Channel Management API.

Parameter Allowed values Description
method getCategories The name of the operation. In this case getCategories
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.

e.g To retrieve the list of Livestream categories one should form the Http Query expression like

GET

    
  http://account.api.livestream.com/account?method=getCategories
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned will be similar to the following XML snippet

       <response status="200">
          <categories>
	     <category id="18" name="Art and Creativity" />
	     <category id="1" name="Auto and Vehicles" />
             ......
         </categories>
       </response>

Languages


The API provides a method getLanguages to retrieve the list of languages as an XML. The language ID returned in the XML can be used to set the channel language in the Channel Management API.

Parameter Allowed values Description
method getLanguages The name of the operation. In this case getLanguages
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.

e.g To retrieve the list of Livestream languages one should form the Http Query expression like

GET

    
  http://account.api.livestream.com/account?method=getLanguages&
  affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned will be similar to the following XML snippet

       <response status="200">
          <languages>
	     <language id="1" iso="en" name="English" />
	     <language id="2" iso="bn" name="Bengali" />
             ......
         </languages>
       </response>

Countries


The API provides a method getCountries to retrieve the list of countries as an XML. The country ID returned in the XML can be used to set the channel country in the Channel Management API.

Parameter Allowed values Description
method getCountries The name of the operation. In this case getCountries
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.

e.g To retrieve the list of countries one should form the Http Query expression like

GET

    
  http://account.api.livestream.com/account?method=getCountries&
  affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned will be similar to the following XML snippet

       <response status="200">
          <countries>
	     <country id="3" iso="AF" name="Afghanistan" iso3="AFG" />
             <country id="6" iso="AL" name="Albania" iso3="ALB" />
             ......
         </countries>
       </response>

Timezones


The API provides a method getTimeZones to retrieve the list of time zones as an XML. The country ID returned in the XML can be used to set the channel time zone in the Channel Management API.

Parameter Allowed values Description
method getTimeZones The name of the operation. In this case getTimeZones
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.

e.g To retrieve the list of time zones one should form the Http Query expression like

GET

    
  http://account.api.livestream.com/account?method=getTimeZones&
  affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned will be similar to the following XML snippet

       <response status="200">
          <timezones>
	     <timezone id="1" location="International Date Line West" 
               offset="(GMT-12:00)" />
             <timezone id="2" location="Midway Island" offset="(GMT-11:00)" />
             ......
         </timezones>
       </response>

Ratings


The API provides a method getRatings to retrieve the list of channel ratings as an XML. The rating ID returned in the XML can be used to set the channel rating in the Channel Management API.

Parameter Allowed values Description
method getRatings The name of the operation. In this case getRatings
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.

e.g To retrieve the list of time zones one should form the Http Query expression like

GET

    
  http://account.api.livestream.com/account?method=getRatings&
  affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned will be similar to the following XML snippet

       <response status="200">
          <ratings>
	     <rating id="1" name="G" description="General Audiences" />
             <rating id="2" name="PG" description="Parental Guidance Suggested" />
             ......
         </ratings>
       </response>

Users


Create User

The method createUser can be used to create a Livestream user. The user thus created will have a Livestream account which he or she can use to login to Livestream and create his or her own channels.

Parameter Allowed values Description
method createUser The name of the operation. In this case createUser
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
password A valid password (min 6 and max 40 characters without period character).
addPrefix true/false Optional parameter when set to true will prefix the username with the reserved prefix (if exists). The default is true.
userXML XML containing the user data like user name, email etc. The XML format is explained below

This method supports both HTTP POST and GET. However it is better to use HTTP POST method for this operation simply because the length of the userXML could be large.

e.g To create a user with a user name benhomer, the userXML would be as mentioned below

       <user>
          <username>benhomer</username>          
          <firstName>Ben</firstName>
          <lastName>Homer</lastName>
          <email>ben.homer@benhomer.com</email>
          <city>New York</city>
          <countryId>223</countryId>
          <postcode>NY1011</postcode>
          <gender>M</gender>
          <dob>1989-09-16</dob>
          <website>www.benhomer.com</website>
          <occupation>IT</occupation>
          <description>Keenly interested in Livestream</description>
          <jobTitle>Homer</jobTitle>
          <company>Ben Homer Inc</company>
       </user>

The following fields are mandatory in the userXML

  • username
  • firstName
  • lastName
  • email

username should have minimum of 4 and maximum of 40 characters without any non english character

countryId - This is id attribute of the country item returned by getCategories method mentioned above. The default country id is 223 (US)

dob - Should strictly be in the format YYYY-MM-DD

Hence the bare minimal userXML format would be as mentioned below

       <user>
          <username>benhomer</username>          
          <firstName>Ben</firstName>
          <lastName>Homer</lastName>
          <email>ben.homer@benhomer.com</email>
       </user>


The following would be the HTTP Request to create a user via

GET

    
  http://account.api.livestream.com/account?method=createUser
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &userXML=<user><username>benhomer</username><firstName>Ben</firstName>
  <lastName>Homer</lastName><email>ben.homer@benhomer.com</email></user>
  &password=<<your password>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And replace <<your password>> with a valid password


In case of successful user creation, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>user created successfully</message>
       </response>

In case of successful user creation, a mail is sent to the user's email id to confirm the user account creation.

Update User Details

The method updateUserDetails can be used to update the details of the user.

Parameter Allowed values Description
method updateUserDetails The name of the operation. In this case updateUserDetails
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
userXML XML containing the user data like user name, email etc. The XML format is explained below

This method supports both HTTP POST and GET. However it is better to use HTTP POST method for this operation simply because the length of the userXML could be large.

e.g To update the details of the user with a user name benhomer, the userXML would be as mentioned below. where username is used as the identifier.

       <user>
          <username>benhomer</username>          
          <firstName>Ben</firstName>
          <lastName>Homer</lastName>
          <email>ben.homer@benhomer.com</email>
          <city>New York</city>
          <countryId>223</countryId>
          <postcode>NY1011</postcode>
          <gender>M</gender>
          <dob>1989-09-16</dob>
          <website>www.benhomer.com</website>
          <occupation>IT</occupation>
          <description>Keenly interested in Livestream</description>
          <jobTitle>Homer</jobTitle>
          <company>Ben Homer Inc</company>
       </user>

The following fields are mandatory in the userXML

  • username

username - should have minimum of 4 and maximum of 40 characters without any non english character

countryId - This is id attribute of the country item returned by getContries method mentioned above. The default country id is 223 (US)

dob - Should strictly be in the format YYYY-MM-DD

Hence the bare minimal userXML format would be as mentioned below

       <user>
          <username>benhomer</username>
          <website>www.newblog.com</website>
          <occupation>Marketing</occupation>          
       </user>
  

The following would be the HTTP Request to update user details via

GET

    
  http://account.api.livestream.com/account?method=updateUserDetails
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &userXML=<user><username>benhomer</username><occupation>Marketing</occupation> 
  <website>www.newblog.com</website></user> 

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.


In case of successful user creation, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>user details updated successfully</message>
       </response>

Get User Details

The method getUserDetails can be used to retrieve the information about the user as an XML belonging into the specified affiliate.

Parameter Allowed values Description
method getUserDetails The name of the operation. In this case getUserDetails
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
username The username of the user

This method supports both HTTP POST and GET.

e.g To retrieve the details of user with username benhomer

The following would be the HTTP Request to create a user via

GET

     
  http://account.api.livestream.com/account?method=getUserDetails
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &username=<<username>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And <<username>> with the username of the user to delete

The response returned would look like

     
<response status="200">
	<user>
		<username>benhomer</username>
		<firstName>Ben</firstName>
		<lastName>Homer</lastName>		
		<city></city>
		<countryId>223</countryId>
		<postcode></postcode>
		<gender></gender>
		<dob></dob>
		<website>www.newblog.com</website>
		<occupation>Marketing</occupation>
		<description></description>
		<jobTitle></jobTitle>
		<company></company>
	</user>
</response>

Delete User

The method deleteUser can be used to delete a user.

Parameter Allowed values Description
method deleteUser The name of the operation. In this case deleteUser
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
username The username of the user

This method supports both HTTP POST and GET.


The following would be the HTTP Request to update user details via

GET

    
  http://account.api.livestream.com/account?method=deleteUser
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &username=<<username>> 

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And <<username>> with the username of the user to delete


In case of successful user deletion, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>user deleted successfully</message>
       </response>

Change Password

The method changePassword can be used to change the password for a user.

Parameter Allowed values Description
method changePassword The name of the operation. In this case changePassword
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
username The username of the user
currentPassword The existing password.
newPassword (min 6 and max 40 characters without period character).

This method supports both HTTP POST and GET.


The following would be the HTTP Request to update user details via

GET

    
  http://account.api.livestream.com/account?method=changePassword
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &username=<<username>>&currentPassword=<<current password>>
  &newPassword=<<new password>> 

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And <<username>> by the username of the user and <<current password>> by the existing password and <<new password>> by the new password to set. .


In case of successful change of password, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>Password changed succesffully</message>
       </response>

Generate Password

The method generatePassword can be used to generate a new random password for the user. The newly generated random password is emailed to the user .

Parameter Allowed values Description
method generatePassword The name of the operation. In this case generatePassword
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
username The username of the user
email The user's email id which is in the Livestream records.

This method supports both HTTP POST and GET.


The following would be the HTTP Request to update user details via

GET

    
  http://account.api.livestream.com/account?method=generatePassword
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &username=<<username>>&email=<<email id>>
  &newPassword=<<new password>> 

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And <<username>> by the username of the user and <<email id>> by the user's email id which is in the Livestream records .


In case of successful generation of new password, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>New password generated and mailed successfully</message>
       </response>

Channels


Create Channel

The method createChannel can be used to create a new channel.

Parameter Allowed values Description
method createChannel The name of the operation. In this case createChannel
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
username The username of the owner of the channel.
addPrefix true/false Optional parameter when set to true will prefix the channel shortName with the reserved prefix (if exists). The default is true.
channelXML XML containing the channel data like shortName, fullName etc. The XML format is explained below

This method supports both HTTP POST and GET. However it is better to use HTTP POST method for this operation simply because the length of the userXML could be large.

e.g To create a channel with a name benchannel, the channelXML would be as mentioned below

      <channel>	
		<shortName>benchannel</shortName>
		<fullName>ben entertainment</fullName>
		<description>Ben's entertaining channel</description>
		<tags>Anything can come here</tags>
		<ratingId>1</ratingId>	
		<timezoneId>1</timezoneId>
		<languageId>12</languageId>	
		<logoUrl></logoUrl>
		<categoryId>1</categoryId>		
		<countryId>223</countryId>	
              <publishInGuide>true</publishInGuide>
              <aspectRatio>16:9</aspectRatio>
	</channel>

The following field(s) are mandatory in the channelXML to create a channel

  • shortName
  • fullName
  • categoryId

shortName - This is considered as the name of the channel with following constraints.

 i)   Has to be between 4 to 40 characters
 ii)  Can contain only alphanumeric characters and underscore(_).
 iii) Cannot contain only numeric characters
 iv)  Cannot start with _
 v)   Cannot end with _
 vi)  Cannot start with ls_
 vii) Cannot end with _ls 

countryId - This is id attribute of the country item returned by getCountries method mentioned above. The default value is 223 (United States).

categoryId - This is id attribute of the categoryitem returned by getCategories method mentioned above.

languageId - This is id attribute of the language item returned by getLanguages method mentioned above. The default value is 1 (English).

timezoneId - This is id attribute of the timezoneitem returned by getTimeZones method mentioned above. The default value is 19 (Eastern Time (US & Canada)).

ratingId - This is id attribute of the ratingitem returned by getRatings method mentioned above. The default value is 1 (General Audiences).

publishInGuide - This element can have the value true or false. If set to true, the channel information is retrieved in the channel guide api.

aspectRatio - This optional element can be used to set the video aspect ratio for the channel. This takes the value of form X:Y where X is the aspect width and Y is the aspect height. The default value is 4:3

The following would be the HTTP Request to create a channel via

GET

    
  http://account.api.livestream.com/account?method=createChannel
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &channelXML=<channel><shortName>benchannel</shortName><fullName>ben   
  entertainment</fullName><description>Ben's entertaining    
  channel</description><categoryId>1</categoryId>
  <aspectRatio>16:9</aspectRatio></channel>
  &username=<<your username>>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And replace <<your username>> with the username of the channel owner


In case of successful user creation, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>channel created successfully</message>
       </response>

Update Channel Details

The method updateChannelDetails can be used to update the details of a channel.

Parameter Allowed values Description
method updateChannelDetails The name of the operation. In this case updateChannelDetails
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
channelXML XML containing the channel data like user shortName, fullName etc. The XML format is explained below

This method supports both HTTP POST and GET. However it is better to use HTTP POST method for this operation simply because the length of the channelXML could be large.

e.g To update a channel with a name benchannel, the channelXML would be as mentioned below

      <channel>	
		<shortName>benchannel</shortName>
		<fullName>ben entertainment</fullName>
		<description>Ben's entertaining channel</description>
		<tags></tags>
		<ratingId>1</ratingId>	
		<timezoneId>1</timezoneId>
		<languageId>0</languageId>	
		<logoUrl></logoUrl>
		<categoryId>0</categoryId>
		<bannerUrl></bannerUrl>
		<bannerDimension></bannerDimension>
		<playerColor></playerColor>
		<backgroundColor></backgroundColor>
		<countryId>0</countryId>
              <publishInGuide>true</publishInGuide>
              <aspectRatio>4:3</aspectRatio>	
	</channel>

The following fields are mandatory in the userXML

  • shortName

shortName - This is considered as the name of the channel

countryId - This is id attribute of the country item returned by getCountries method mentioned above.

categoryId - This is id attribute of the categoryitem returned by getCategories method mentioned above.

languageId - This is id attribute of the language item returned by getLanguages method mentioned above.

timezoneId - This is id attribute of the timezoneitem returned by getTimeZones method mentioned above.

ratingId - This is id attribute of the ratingitem returned by getRatings method mentioned above.

publishInGuide - This element can have the value true or false. If set to true, the channel information is retrieved in the channel guide api.

aspectRatio - This element can be used to set the video aspect ratio for the channel. This takes the value of form X:Y where X is the aspect width and Y is the aspect height.

Hence the bare minimal userXML format would be as mentioned below

       <channel>
          <shortName>benchannel</shortName>		
       </channel>


The following would be the HTTP Request to update user details via

GET

    
  http://account.api.livestream.com/account?method=updateChannelDetails
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &channelXML=<channel><shortName>benchannel</shortName><fullName>ben 
  entertainment</fullName><description>Ben's entertaining  
  channel</description><aspectRatio>4:3</aspectRatio></channel>

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.


In case of successful user creation, the response returned will be similar to the following XML snippet

       <response status="200">
           <message>channel details updated successfully</message>
       </response>

Get Channel Details

The method getChannelDetails can be used to retrieve the information about a channel as an XML belonging into the specified affiliate.

Parameter Allowed values Description
method getChannelDetails The name of the operation. In this case getChannelDetails
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The shortName of the channel

This method supports both HTTP POST and GET.

e.g To retrieve the details of channel benchannel

The following would be the HTTP Request to create a user via

GET

     
  http://account.api.livestream.com/account?method=getChannelDetails
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<channel>
		<shortName>benchannel</shortName>
		<fullName>ben entertainment full</fullName>
		<description>Ben's entertaining channel</description>
		<tags></tags>
		<ratingId>0</ratingId>
		<timezoneId>0</timezoneId>
		<languageId>0</languageId>
		<logoUrl></logoUrl>
		<categoryId>0</categoryId>
		<bannerUrl></bannerUrl>
		<bannerDimension></bannerDimension>
		<playerColor></playerColor>
		<backgroundColor></backgroundColor>
		<countryId>0</countryId>
              <publishInGuide>true</publishInGuide>
              <aspectRatio>16:9</aspectRatio>
	</channel>
</response>

Get Channel Live Status

The method isChannelLive can be used to find whether is channel is live or not.

Parameter Allowed values Description
method isChannelLive The name of the operation. In this case isChannelLive
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The shortName of the channel

This method supports both HTTP POST and GET.

e.g To know the live status of the channel benchannel

The following would be the HTTP Request to create a user via

GET

     
  http://account.api.livestream.com/account?method=isChannelLive
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<channel isLive='false'></channel>
</response>

Team


The API provides a set of operations to create and manage the production team of your channel. You can invite a friend to sign up and be a member of your channel, add an existing Livestream user as a member of your production team and so on.

Invite a friend

Using the method inviteFriend, you can invite your friend to join your production team. A mail will be sent to your friend on the successful invocation of this operation. By following the instructions in the mail, your friend will create his/her own Livestream account and will also become the member of your production team.

Parameter Allowed values Description
method inviteFriend The name of the operation. In this case inviteFriend
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel.
email email id of your friend.
cameraModeOnly true,false Boolean value, if set to true, the member will be allowed only to access the channel in the camera mode. The default value is false

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to invite your friend to join the team for channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=inviteFriend
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&email=<<Your friend's email id>>&cameraModeOnly=true

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream. And replace <<Your friend's email id>> with your friend's email id.

The response returned would look like

     
<response status="200">
	<message>
               An invitation has been sent to the email id <<Your friend's email id>>
	</message>
</response>

Add a member

Using the method addMember, you can add an existing Livestream user as the member of your production team.

Parameter Allowed values Description
method addMember The name of the operation. In this case addMember
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of user whom you want to add to your team
cameraModeOnly true,false Boolean value, if set to true, the member will be allowed only to access the channel in the camera mode. The default value is false

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to add the user 'homer' to your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=addMember
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=homer

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
            User homer added to the members list successfully
        </message>
</response>

Remove member

Using the method removeMember, you can remove a member from your production team.

Parameter Allowed values Description
method removeMember The name of the operation. In this case removeMember
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of user whom you want to remove from your production team.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to remove the user 'homer' from the production team of your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=removeMember
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=homer

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
            User homer removed from the members list successfully
        </message>
</response>

Lock member

Using the method lockMember, you can lock a member from logging into your channel.

Parameter Allowed values Description
method lockMember The name of the operation. In this case lockMember
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of the member whom you want to lock.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to lock the member 'homer' from logging into your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=lockMember
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=homer

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
           Locked the user benchannel successfully
        </message>
</response>

Unlock member

Using the method unlockMember, you can unlock a member and allow him/her to login to your channel.

Parameter Allowed values Description
method unlockMember The name of the operation. In this case unlockMember
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of the member whom you want to unlock.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to unlock the member 'homer' for your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=unlockMember
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=homer

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
           Unlocked the user benchannel successfully
        </message>
</response>

Set camera mode only

Using the method setCameraModeOnly, you can restrict the access to your member to your channel only in the camera mode.

Parameter Allowed values Description
method setCameraModeOnly The name of the operation. In this case setCameraModeOnly
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of the member whom you want to unlock.
cameraModeOnly true,false If set to true, member can access your channel only in the camera mode. If set to false, member can access your channel in any mode.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to restrict the member 'homer' to camera mode only for your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=setCameraModeOnly
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=homer&cameraModeOnly=true

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
           camera mode set to true for the  member homer successfully
        </message>
</response>

Retrieve members

Using the method getMembers, you can retrieve the usernames of the members of a channel.

Parameter Allowed values Description
method getMembers The name of the operation. In this case getMembers
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to retrieve the usernames for channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=getMembers
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<members>
            <member>drake</member>
            <member>paul</member>
        </members>
</response>

Is user a member of the team

Using the method isMember, you can check whether a Livestream user is a member of your channel or not.

Parameter Allowed values Description
method isMember The name of the operation. In this case isMember
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel
username The username of the user

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to check whether the user 'paul' is a member of your channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=isMember
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=paul

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
            true
        </message>
</response>

Is member locked

Using the method isLocked, you can check whether a member of your production team is locked from logging into a channel

Parameter Allowed values Description
method isLocked The name of the operation. In this case isLocked
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel.
username The username of the member.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to check whether the member 'paul' is locked from logging into the channel 'benchannel'

GET

     
  http://account.api.livestream.com/account?method=isLocked
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=paul

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
            false
        </message>
</response>

Is member set to camera mode only

Using the method isCameraModeOnly, you can check whether a member of your production team is restricted to produce a channel only in the camera mode.

Parameter Allowed values Description
method isCameraModeOnly The name of the operation. In this case isCameraModeOnly
affiliateId Affiliate Id provided by Livestream.
applicationKey Application key provided by Livestream.
shortName The short name of the channel.
username The username of the member.

This method supports both HTTP POST and GET.

e.g The following would be the HTTP Request to check whether the member 'paul' is restricted to produce channel benchannel in the camera mode only

GET

     
  http://account.api.livestream.com/account?method=isCameraModeOnly
  &affiliateId=<<your affiliate ID>>&applicationKey=<<Your application key>>
  &shortName=benchannel&username=paul

Note: Replace <<your affiliate ID>> and <<Your application key>> by the affiliate id and application key provided by Livestream.

The response returned would look like

     
<response status="200">
	<message>
            true
        </message>
</response>

Response Codes



Code Message Description
200 OK Invoked operation is executed successfully.
400 Client Error Client error occurs when the requested url is malformed.
401 Unauthorized client error Response code 401 is returned when the given affiliateId or the Application key Is invalid. Or The channel of the user requested doesn't exisits
503 Server Error Server error may occur when the livestream account management server is temporarily down for maintenance.