Invitation to join a new participant to the on going video call as follow
URL-- https://www.videocall.co/api/inviteMembers
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
User Name | Username for the company |
Email Id | emailIds to which you want to send an invitation mail |
Invite URL | An URL to join participant |
Room Channel Id | A unique 10 letter alpha numeric string |
Invite Name | Name of the Invite |
Invite Email Id | EmailId of the inviter |
Company Name | Comapny name |
Pin Protected | If the Room is pin protected,value= " yes " If the Room is not a pin protected,value= " no " |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/inviteMembers",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&company=videocall&userName=test&emailIds=linda@iton.ca,ray@iton.ca&inviteURL=https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl&inveterName=abdullah&inviterEmailId=we@iton.com&companyName=videocall&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH&isPinProtected=no"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "userName"=>"test", "emailIds"=>"linda@iton.ca,ray@iton.ca", "inviteURL"=>"https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl", "inveterName"=>"abdullah", "inviterEmailId"=>"we@iton.com", "companyName"=>"videocall", "RoomName"=>"MyVideoCall", "RoomChannelId"=>"25bt3rwjkH", "isPinProtected"=>"no" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/inviteMembers"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/inviteMembers' values = { 'apiKey':'xxxxxx', 'userName':'test', 'emailIds':'linda@iton.ca,ray@iton.ca', 'inviteURL':'https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl", 'inveterName':'abdullah", 'inviterEmailId':"we@iton.com", 'companyName':"videocall", 'RoomName':'MyVideoCallRoom', 'RoomChannelId':'25bt3rwjkH', 'isPinProtected':'no' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&company=videocall&userName=test&emailIds=linda@iton.ca,ray@iton.ca&inviteURL=https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl&inveterName=abdullah&inviterEmailId=we@iton.com&companyName=videocall&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH&isPinProtected=no"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/inviteMembers"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/inviteMembers"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", userName="test", emailIds="linda@iton.ca,ray@iton.ca", inviteURL ="https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl", inveterName ="abdullah", inviterEmailId ="we@iton.com", companyName ="videocall", RoomName ="MyVideoCallRoom", RoomChannelId ="25bt3rwjkH", isPinProtected ="no", }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/inviteMembers", crossDomain : true, data : { apiKey:"xxxxxx", userName:"test", emailIds:"linda@iton.ca,ray@iton.ca", inviteURL:"https://www.videocall.co/invitee#VC_MkVtdmhuMDlpel9lcnJycl9ycnJfampAZ21haWwuY29tX25vX2ZhbHNl", inveterName:"abdullah", inviterEmailId:"we@iton.com", companyName:"videocall", RoomName:"MyVideoCall", RoomChannelId:"25bt3rwjkH", isPinProtected:"no" }, dataType : "json", success: function (obj) { console.log ('success'); } });
Get the list of participants for the on going video call as follow
URL-- https://www.videocall.co/api/getParticipantsList
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
Room Name | A unique name of the Room entered by the user |
Room Channel Id | A unique 10 letter alpha numeric string |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/getParticipantsList",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&company=videocall&userName=test&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "RoomName"=>"MyVideoCall", "RoomChannelId"=>"25bt3rwjkH" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/getParticipantsList"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/getParticipantsList' values = { 'apiKey':'xxxxxx', 'RoomName':'MyVideoCallRoom', 'RoomChannelId':'25bt3rwjkH' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&company=videocall&userName=test&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/getParticipantsList"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/getParticipantsList"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", RoomName ="MyVideoCallRoom", RoomChannelId ="25bt3rwjkH", }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/getParticipantsList", crossDomain : true, data : { apiKey:"xxxxxx", RoomName:"MyVideoCall", RoomChannelId:"25bt3rwjkH" }, dataType : "json", success: function (obj) { console.log ('success'); } });
Removing participants from an on going video call Room as follow
URL-- https://www.videocall.co/api/removeParticipants
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
User Name | Username for the company |
Email Id | emailId |
Room Name | A unique name of the Room entered by the user |
Room Channel Id | A unique 10 letter alpha numeric string |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/removeParticipants",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&company=videocall&userName=test&emailId=we@iton.com&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "userName"=>"test", "emailId"=>"we@iton.com", "RoomName"=>"MyVideoCall", "RoomChannelId"=>"25bt3rwjkH" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/removeParticipants"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/removeParticipants' values = { values = { 'apiKey':'xxxxxx', 'userName':'test', 'emailId':'we@iton.com', 'RoomName':'MyVideoCallRoom', 'RoomChannelId':'25bt3rwjkH' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&company=videocall&userName=test&emailId=we@iton.com&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/removeParticipants"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/removeParticipants"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", userName ="test", emailId ="we@iton.com", RoomName ="MyVideoCallRoom", RoomChannelId ="25bt3rwjkH", }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/removeParticipants", crossDomain : true, data : { apiKey:"xxxxxx", userName:"test", emailId:"we@iton.com", RoomName:"MyVideoCall", RoomChannelId:"25bt3rwjkH" }, dataType : "json", success: function (obj) { console.log ('success'); } });
After login you will have the user info with you.With that info you can create a video call connection to the user.
Download VideoCallConnection.js and add it to your page head.
URL-- https://www.videocall.co/static/js/ITONCCCustomerScript-v1.2demo-original.js
Working with VideoCallConnection first step is to instantiate VideoCallConnection.
var vcConnection = new VideoCallConnection( );
The above code will instantiate VideoCallConnection with default signaling server.
“startLocalMedia( )" method is used to get local media from user. We need to pass a callback function as argument with two arguments one for local video control and other one is success event data which holds complete data including local video control.
vcConnection.startLocalMedia(function(localVideoControl, e) { // callback function // after successfully getting media // local video control is the video DOM. // e is the get media success event. });
"addCustomData( )" is used to add custom data which will be shared with all clients in the conference. We need pass three arguments first one is key and second one is the value of the key and third is success callback which is optional.
var vcConnection = new VideoCallConnection( ); vcConnection.addCustomData("username", "test", function(e) { // success callback function optional });
startConference( ) method is used to create or join Conference.
channelid is the name or id of conference/Room.
This argument is called when a new user is added to the conference.
var vcConnection = new VideoCallConnection( ); vcConnection.addCustomData("username", "test", function(e) { // success callback function optional });
This argument is called when a user leaves a conference.
function videoRemovedCallback( userCustomData, e) { // userCustomData is the remote user's custom data. // e is the event data on video added which complete info };
This argument is called when a user creates a conference or when a user joins an on-going conference.
function joinSuccessCallback(e) { // e is the event data object };
This argument is called when a group chat message is received
function dataReceivedCallback(e) { // e is the event data object }; var vcConnection = new VideoCallConnection( ); vcConnection.startConference(channelId, videoAddedCallback, videoRemovedCallback, joinSuccessCallback, dataReceivedCallback);
This method is used to send a private chat message to any particular user in the conference.
It has four arguments.
ClientId, Message, SuccessCallBack function, Failure callback function.
var vcConnection = new VideoCallConnection( ); vcConnection.SendPersonalMessage(clientId, Message, function (e){ // success callback function optional }, function(e) { // failure callback function optional });
This method is used to get the remote stream and remote video control of a particular remote user in the conference. We need to pass the peerId of the remote user to get details. It returns an object which has details such as
Remote Stream, Remote Video Control and Custom data.
var vcConnection = new VideoCallConnection( ); vcConnection.getRemoteVideoControlAndStream(peerID);
This method is used to leave a conference. It requires only one argument which is a optional success call back.
var vcConnection = new VideoCallConnection( ); vcConnection.leaveConference(function(e) { // success callback function optional });
Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum is simply dummy text of the printin
"Initiator" is a boolean property, which returns a true value if the current user is the Initiator of the conference.
var vcConnection = new VideoCallConnection( ); vcConnection.Initiator // returns true or false
"LocalMediaStream" holds the local media stream object."
var vcConnection = new VideoCallConnection( ); vcConnection.LocalMediaStream // returns stream object should be used only after getting media
"Conference property holds the instance of Videocall Conference"
var vcConnection = new VideoCallConnection( ); vcConnection.LocalMediaStream // returns stream object should be used only after getting media
channelId" holds the channelId of the ongoing conference
var vcConnection = new VideoCallConnection( ); vcConnection.channelId // returns channelId of the ongoing conference.
Check the status of an going video call as follow
URL-- https://www.videocall.co/api/checkRoomStatus
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
Room Name | A unique name of the Room entered by the user |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/checkRoomStatus",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&RoomName=MyVideoCallRoom"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "RoomName"=>"MyVideoCall" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/checkRoomStatus"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/checkRoomStatus' values = { 'apiKey':'xxxxxx', 'RoomName': 'MyVideoCall' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&company=videocall&userName=test&RoomName=MyVideoCallRoom"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/checkRoomStatus"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/checkRoomStatus"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", RoomName ="MyVideoCall" }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/checkRoomStatus", crossDomain : true, data : { apiKey:"xxxxxx", RoomName:"MyVideoCall" }, dataType : "json", success: function (obj) { console.log ('success'); } });
Close an on going video call as follow
URL-- https://www.videocall.co/api/closeEntireRoom
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
Room Name | A unique name of the Room entered by the user |
Room Channel Id | A unique 10 letter alpha numeric string |
Pin Protected | If the Room is pin protected,value= " yes " If the Room is not a pin protected,value= " no " |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/closeEntireRoom",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&RoomName=MyVideoCallRoom&RoomChannelId=25bt3rwjkH"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "RoomName"=>"MyVideoCall", "RoomChannelId"=>"25bt3rwjkH" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/closeEntireRoom"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/closeEntireRoom' values = { 'apiKey':'xxxxxx', 'RoomName': 'MyVideoCall', 'RoomChannelId' :'25bt3rwjkH' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&company=videocall&userName=test&RoomName=MyVideoCallRoom&RoomChannelId=5bt3rwjkH"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/closeEntireRoom"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/closeEntireRoom"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", RoomName ="MyVideoCall", RoomChannelId="25bt3rwjkH" }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/closeEntireRoom", crossDomain : true, data : { apiKey:"xxxxxx", RoomName:"MyVideoCall", RoomChannelId:"25bt3rwjkH"" }, dataType : "json", success: function (obj) { console.log ('success'); } });
Get feedback from an on going video call as follow
URL-- https://www.videocall.co/api/feedBack
Parameter | Description |
---|---|
apiKey | Refers to the apiKey that is given at the time of registration. |
To Improve | Field to enter what to improve |
Liked | Field to enter what you like in the app |
Add Functionality | Field to enter what you what us to add in the app |
Bugs | Field to enter what are the bugs you find in the app |
Industry | Name of the company the user belongs |
Email Id | EmailId of the users |
Name | Name of the User |
Files | Files |
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest( ); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","https://www.videocall.co/api/feedBack",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("apiKey=xxxxxx&toImprove=Good&liked=yes&addFunctionality=if any&bugs=no&industry=iton&emailId=we@iton.com&name=abdullah&files=if any file uploaded"); xmlhttp.onreadystatechange=function( ) { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var jsonResultBuffer = xmlhttp.responseText; } }
$params = array( "apiKey"=>"xxxxxx", "toImprove"=>"Good", "liked"=>" yes ", "addFunctionality"=>"if any" "bugs"=>"no" "industry"=>"iton" "emailId"=>"we@iton.com" "name"=>"abdullah" "files"=>"if any file uploaded" ); $postData = ''; foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init( ); curl_setopt($ch,CURLOPT_URL,"https://www.videocall.co/api/feedBack"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output;
import urllib.parse import urllib.request url = 'https://www.videocall.co/api/feedBack' values = { 'apiKey':'xxxxxx', 'toImprove':'Good', 'liked:'yes', 'addFunctionality:'if any', 'bugs:'no', 'industry:'iton' 'emailId:'we@iton.com', 'name:'abdullah', 'files:'if any file uploaded' } data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) response = urllib.request.urlopen(req) the_page = response.read( )
String urlParameters = "apiKey=xxxxxx&toImprove=Good&liked=yes&addFunctionality=if any&bugs=no&industry=iton&emailId=we@iton.com&name=abdullah&files=if any file uploaded"; byte[] postData = urlParameters.getBytes( Charset.forName( "UTF-8" )); int postDataLength = postData.length; URL url = new URL("https://www.videocall.co/api/feedBack"); HttpURLConnection conn = (HttpURLConnection) url.openConnection( ); conn.setDoOutput(true); conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty( "charset", "utf-8"); conn.setRequestProperty( "Content-Length", Integer.toString( postDataLength )); conn.setRequestMethod("POST"); conn.connect( ); OutputStream os = conn.getOutputStream( ); os.write(postData); os.flush( ); BufferedReader br = new BufferedReader(new InputStreamReader( (conn.getInputStream( )))); String response=""; String eachLine=""; System.out.println("Response from Server .... \n"); while ((eachLine = br.readLine( )) != null) { response += eachLine; } System.out.println(response); conn.disconnect( );
HttpClient client = new HttpClient( ); public usermgmt( ){ InitializeComponent( ); client.BaseAddress = new Uri("https://www.videocall.co/api/feedBack"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } private async void btnNewStudent_Click(object sender, RoutedEventArgs e) { try { var USERMGMT = new USERMGMT( ) { apiKey = "xxxxxx", toImprove ="Good", liked =" yes ", addFunctionality ="if any", bugs ="no", industry ="iton", emailId ="we@iton.com", name ="abdullah", files = "if any file uploaded", }; var response = await client.PostAsJsonAsync("app/videocall/", USERMGMT); response.EnsureSuccessStatusCode( ); // Throw on error code. MessageBox.Show("Success", "Result", MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error"); } }
$.ajax({ type : "post", url : "https://www.videocall.co/api/feedBack", crossDomain : true, data : { apiKey:"xxxxxx", toImprove:"Good", liked:" yes ", addFunctionality:"if any" bugs:"no" industry:"iton" emailId:"we@iton.com" name:""abdullah" files:"if any file uploaded" }, dataType : "json", success: function (obj) { console.log ('success'); } });