LogMeIn Rescue API User Guide

requestAuthCodeSSO

Generates an authentication code that prevents the technician who uses single sign-on from logging out if there is a timeout.

Input Parameters

Element Description
ssoid The single sign-on ID of the Rescue user. Required.
pwd The single sign-on password of the company's Rescue account. Required.
company The identifier of the company using single sign-on to authenticate technicians. Required.
Note: The identifier must contain numbers only.

Output

OK AUTHCODE: 4ahx99bppkzxocbs590roo1l99o7au9rmwnea8q3areaiceaw1afq55jx89nl5zt63hxlo298qf80u0
AUTHCODE: Secret authentication code

Return Values

Displayed Return Value Description
ERROR An unspecified error occurred, such as timeout.
OK Generating an authentication code succeeded.
INVALID The password and single sign-on ID do not identify and authenticate a technician.
INVALIDPARAM_COMPANY The provided company identifier contains non-numeric characters.

Sample Code

The following are examples for using the requestAuthCodeSSO method that you can call in your environment.

HTTP GET

https://secure.logmeinrescue.com/API/requestAuthCodeSSO.aspx?ssoid=123456&pwd=secretPassword
&company=654321

HTTP POST

<form method="post" action="https://secure.logmeinrescue.com/API/requestAuthCodeSSO.aspx">
        <input name="ssoid" value="123456">
        <input name="pwd" value="secretPassword">
        <input name="company" value="654321">
</form>

SOAP

For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=requestAuthCodeSSO.

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");
	
	$sSSOID = "123456";
	$sPwd = "secretPassword";
	$sCompany = "654321";
	
	$requestauthcodeparams = array(
 	'sSSOID' => $sSSOID,
	'sPassword' => $sPwd,
	'sCompany' => $sCompany
	);
	
	$requestAuthCodeResult = $soapclient->requestAuthCodeSSO($requestauthcodeparams);
	
	print_r($requestAuthCodeResult);
?>

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 sSSOID = "123456";
                string sPwd = "secretPassword";
                string sCompany = "654321";

                HttpWebRequest oRequestAuthCode = (HttpWebRequest)WebRequest.Create(sEndpoint
 + "requestAuthCodeSSO.aspx?ssoid=" + sSSOID + "&pwd=" + sPwd + "&company=" + sCompany);
                HttpWebResponse oRespAuthCode = (HttpWebResponse)oRequestAuthCode
.GetResponse();

                string sRespAuthCode = new StreamReader(oRespAuthCode.GetResponseStream())
.ReadToEnd();
                Response.Write(sRespAuthCode);
            }
            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 sSSOID = "123456";
                string sPwd = "secretPassword";
                string sCompany = "654321";

                WebServiceClients.requestAuthCodeRet oRequestAuthCode = proxy.requestAuthCodeSSO
(sEmail, sPwd, out sAuthCode);
                Response.Write(oRequestAuthCode + "<br />");

                Response.Write("authCode: " + sAuthCode);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
    }
}