transferSession
An administrator can transfer a technician session to another technician. You can transfer a session from the Sessions tab of the Rescue Administration Center. For more information, see How to Transfer a Session in the LogMeIn Rescue Administration Center User Guide.
Input Parameters
Element | Description |
---|---|
session | The ID of the target session. Required. |
node | The session is picked up by this
technician.
If a node is a technician and, for example, an administrator as well, then you can only transfer a session to the node as a technician. Therefore, you have to use the technician ID of the node. Required. |
noderef | The reference of the target node, which can be NODE or CHANNEL. Optional, default is NODE. |
comment | A comment on the transfer. Optional. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Transferring the session succeeded. |
NOTLOGGEDINASADMIN | Transferring the session failed because the administrator is not logged in. |
ACTIONFAILED | Transferring the session failed because the technician is offline and the Technician Console is not running. |
INVALIDPARAM_NODE | The ID of the user who transfers the
session is incorrect. This error occurs in the following cases:
|
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user is deleted or disabled. |
Sample Code
The following are examples for using the transferSession method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/transferSession.aspx?session=12345678
&node=337366&noderef=NODE&comment=transfer session&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/transferSession.aspx">
<input name="session" value="12345678">
<input name="node" value="337366">
<input name="noderef" value="NODE">
<input name="comment" value="transfer session">
<input name="authcode" value="4ahx...80u0">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=transferSession.
PHP with SOAP
The example values shown must be replaced with actual values.
<?php
$soapclient = new SoapClient("https://secure.logmeinrescue.com/api/api.asmx?wsdl");
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
$iSessionID = 12345678;
$iNodeID = 337366;
$eNodeRef = NODE;
$sComment = "transfer session";
$sAuthCode = "4ahx...80u0";
$transfersessionparams = array (
'iSessionID' => $iSessionID,
'iNodeID' => $iNodeID,
'eNodeRef' => $eNodeRef,
'sComment' => $sComment,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$transferSessionResult = $soapclient->transferSession($transfersessionparams);
print_r($transferSessionResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using apiSamples.WebServiceClients;
namespace apiSamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEndpoint = "https://secure.logmeinrescue.com/api/";
string sEmail = "some@email.com";
string sPwd = "secretpassword";
int iSession = 12345678;
int iNodeID = 337366;
string eNodeRef = "NODE";
string sComment = "transfer session";
string sAuthCode = "4ahx...80u0";
HttpWebRequest oLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx?email=" + sEmail + "&pwd=" + sPwd);
oLogin.CookieContainer = new CookieContainer();
HttpWebResponse oRespLogin = (HttpWebResponse)oLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream())
.ReadToEnd();
Response.Write(sRespLogin + "<br />");
CookieContainer sessioncookie = oLogin.CookieContainer;
HttpWebRequest oReqTransferSession = (HttpWebRequest)WebRequest.Create
(sEndpoint + "transferSession.aspx?session=" + iSession + "&node=" + iNodeID + "&noderef="
+ eNodeRef + "&comment=" + sComment + "&authcode=" + sAuthCode);
HttpWebResponse oRespTransferSession = (HttpWebResponse)
oReqTransferSession.GetResponse();
string sRespTransferSession = new StreamReader
(oRespTransferSession.GetResponseStream()).ReadToEnd();
Response.Write(sRespTransferSession);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using apiSamples.WebServiceClients;
namespace apiSamples
{
public partial class SOAP : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iSession = 12345678;
int iNodeID = 337366;
NODE_REF eNodeRef = NODE_REF.NODE;
string sComment = "Escalating";
string sAuthCode = "";
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.transferSessionRet oTransferSession
= proxy.transferSession(iSession, iNodeID, eNodeRef, sComment, sAuthCode);
Response.Write(oTransferSession);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}