Rescue API Reference Guide
Overview of the Rescue API
The Rescue API is a tool for retrieving information related to your Rescue account from the LogMeIn environment and based on that information, recreate most of the functionality that the Rescue Administration Center offers. This document describes the Rescue methods that you can use to interact with Rescue from your environment. For information about the functionality that these methods invoke, see the Rescue Administration Center User Guide.
Why would I use Rescue API?
The primary examples of why you would do this are:
- Make the Administration Center functionality available from your own website
- CRM Integration
- Custom Reporting
- Billing Integration
- Customize the Administration Center
Who should read this document?
The pages related to the API are written for a technical audience. Since utilization of the API is custom in nature, the following must be considered:
- Support for using the API is very limited since its usage is custom in nature
- Knowledge of API, Web Service usage, and programming are required
What technology does the Rescue API support?
The Rescue API supports three methods for communication that C# and PHP programmers can use:
Communication Method | Description |
---|---|
HTTP GET | This protocol creates a query string of the name and value pairs and then appends the query string to the URL of the script on the server that handles the request. For example, if you want to retrieve information about a technician with ID 123456, you must use the URL of the getUser API method and append the input parameter (node) at the end of the URL:
|
HTTP POST | This protocol passes the name and value pairs in the body of the HTTP request message. For example, if you want to retrieve information about the technician with ID 123456, you must define API method you want to call (getUser) and then the name and value of the input parameter (node):
|
SOAP | This protocol is used for exchanging XML messages between clients and servers. The response message can be easily parsed into a third-party system as the structure of the message is based on well-defined standards. |
What samples do I get?
All PHP examples use PHP5's built-in SOAP extension.
Examples in C# are compiled for ASP.NET 2.0 compatibility, and use HttpWebRequest, which in turn uses the HTTP POST variables listed in the examples for each API method.
Where can I learn more about API programming?
There are numerous tutorials for HTML, XML, C#, and PHP programming available on the Internet that help you understand and reproduce the examples given in this document. Visit the following websites to find out more about the API programming code:
- For a C# tutorial, visit http://www.csharp-station.com/Tutorial
- For HTML, XML, and PHP tutorials, visit http://www.w3schools.com
API Quick Starts
Options for Authenticating with Rescue API
Rescue API offers two methods to authenticate users:
- The logIn method is used with applications that can handle session cookies over the HTTP protocol. It imitates the log in process of the Rescue website and session cookies are used to store and send user information. An account holder who is logged in with the logIn method must log in again after 20 minutes of inactivity.
- The requestAuthCode method is used with applications that cannot handle session cookies over the HTTP protocol. This method generates a random string of characters (authcode) that authenticates the Rescue account holder. The account holder uses this authcode to invoke API methods without actually logging in to the Rescue account. With a valid authcode, the account holder can invoke any number of API methods. An authcode does not time out; it remains valid until the account holder requests a new one.
The Rescue API quick starts provide examples for both methods.
Using an authcode
How to List Sessions of a Channel
Why would you do this? You can see the details of one or more of your technicians' sessions and also see technicians' current and past workload.
How to Assign or Unassign a Technician to a Channel
Why would you do this? You can transfer technicians between channels to set the workload of your technicians.
How to View Technician Activity
Why would you do this? You can ensure your technician has a balanced workload.
How to Change a Technician's Password
Why would you do this? In case a technician forgets his password you can easily change that with Rescue API.
How to Transfer a Session to an Available Channel
Why would you do this? You can reduce customers' waiting time by transferring sessions in Waiting status to a channel that has an available technician.
Results: The selected session is transferred to a channel with an available technician.
Using the logIn Method
How to List Sessions of a Channel
Why would you do this? You can see the details of one or more of your technicians' sessions and also see technicians' current and past workload.
Here is a complete example for checking technician availability:
- With HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com &pwd=secretPassword https://secure.logmeinrescue.com/API/getSession_v3.aspx?node=1902861082 &noderef=CHANNEL
- With HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx"> <input name="email" value="some@email.com"> <input name="pwd" value="secretPassword"> </form> <form method="post" action="https://secure.logmeinrescue.com/API/getSession_v3.aspx"> <input name="node" value="1902861082"> <input name="noderef" value="CHANNEL"> </form>
How to Assign or Unassign a Technician to a Channel
Why would you do this? You can transfer technicians between channels to set the workload of your technicians.
Here is a complete example for checking technician availability:
- With HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com &pwd=secretPassword https://secure.logmeinrescue.com/API/assignChannel.aspx?node=337366&entry=1902861082
- With HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx"> <input name="email" value="some@email.com"> <input name="pwd" value="secretPassword"> </form <form method="post" action="https://secure.logmeinrescue.com/API/assignChannel.aspx"> <input name="node" value="337366"> <input name="entry" value="1902861082"> </form>
How to View Technician Activity
Why would you do this? You can ensure your technician has a balanced workload.
Here is a complete example for checking technician availability:
- With HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com &pwd=secretPassword https://secure.logmeinrescue.com/API/setReportDate_v2.aspx?bdate=12/1/2011 &edate=12/31/2011 https://secure.logmeinrescue.com/API/setReportTime.aspx?btime=9:00:00 &etime=17:00:00 https://secure.logmeinrescue.com/API/setReportArea.aspx?area=3 https://secure.logmeinrescue.com/API/getReport.aspx?node=337366&noderef=NODE
- With HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx"> <input name="email" value="some@email.com"> <input name="pwd" value="secretPassword"> </form <form method="post" action="https://secure.logmeinrescue.com/API/setReportDate_v2.aspx"> <input name="bdate" value="12/1/2011"> <input name="edate" value="12/31/2011"> </form> <form method="post" action="https://secure.logmeinrescue.com/API/setReportTime.aspx"> <input name="btime" value="9:00:00"> <input name="etime" value="17:00:00"> </form> <form method="post" action="https://secure.logmeinrescue.com/API/setReportArea.aspx"> <input name="area" value="3"> </form> <form method="post" action="https://secure.logmeinrescue.com/API/getReport.aspx"> <input name="node" value="337366"> <input name="noderef" value="NODE"> </form>
How to Change a Technician's Password
Why would you do this? In case a technician forgets his password you can easily change that with Rescue API.
Here is a complete example for checking technician availability:
- With HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com &pwd=secretPassword https://secure.logmeinrescue.com/API/setUser.aspx?node=337366&name=John Doe &nick=JDoe &email=jdoe@company.com&ssoid=123456&pwd=secretPassword&confpwd=secretPassword &oldpwd=oldPassword&status=enabled&description=Admin&addons=true&rpataddon=false
- With HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx"> <input name="email" value="some@email.com"> <input name="pwd" value="secretPassword"> </form <form method="post" action="https://secure.logmeinrescue.com/API/setUser.aspx"> <input name="node" value="337366"> <input name="name" value="John Doe"> <input name="nick" value="JDoe"> <input name="email" value="jdoe@company.com"> <input name="ssoid" value="123456"> <input name="pwd" value="secretPassword"> <input name="confpwd" value="secretPassword"> <input name="oldpwd" value="oldPassword"> <input name="status" value="enabled"> <input name="description" value="Admin"> <input name="addons" value="true"> <input name="rpataddon" value="false"> </form>
How to Transfer a Session to an Available Channel
Why would you do this? You can reduce customers' waiting time by transferring sessions in Waiting status to a channel that has an available technician.
Results: The selected session is transferred to a channel with an available technician.
Here is a complete example for checking technician availability:
- With HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com &pwd=secretPassword https://secure.logmeinrescue.com/API/isAnyTechAvailableOnChannel.aspx?ChannelID= 1902861082&ExcludingAwayAndBusy=true https://secure.logmeinrescue.com/API/transferSession.aspx?session=123456& node=1902861082&noderef=CHANNEL
- With HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx"> <input name="email" value="some@email.com"> <input name="pwd" value="secretPassword"> </form <form method="post" action="https://secure.logmeinrescue.com/API/ isAnyTechAvailableOnChannel.aspx"> <input name="ChannelID" value="1902861082"> <input name="ExcludingAwayAndBusy" value="true"> </form> <form method="post" action="https://secure.logmeinrescue.com/API/transferSession.aspx"> <input name="session" value="123456"> <input name="node" value="1902861082"> <input name="noderef" value="CHANNEL"> </form>
Rescue Identity Service 2 API Quick Start
Overview
Currently, it supports three flows:
- Authorization Code Flow (with PKCE)
- Client Credentials Flow
- Refresh Token Flow
These flows generate an access token that provides access to Rescue resources. At present, the ASPX services accessible through URLs that start with https://secure.logmeinrescue.com/API/ are supported.
(For example https://secure.logmeinrescue.com/API/getUser.aspx)
How to Use Authorization Code Flow?
There are two types of clients: public and confidential. The process for requesting an access token varies slightly between these types. The table below outlines these differences:
Public Client | Confidential Client | |
---|---|---|
Client Secret | - | Mandatory |
PKCE | Mandatory | Optional |
For confidential clients, providing a client secret is mandatory, while PKCE is optional. On the other hand, for public clients, PKCE is mandatory.
1. Getting an Authorization Code
To request a code via API, you have to call the https://secure.logmeinrescue.com/id-srv-api/api/oauth/code endpoint with the following details:
- HTTP method: GET
- HTTP query parameters:
- response_type: code
- client_id: the client's ID
- scope: a valid scope of the client
- state: a random string (e.g. random 10 character base64 string)
- redirect_uri: a valid redirect URL of the client
- code_challenge_method: code challenge method (Optional)
- code_challenge: hashed nonce
- HTTP header: valid Rescue session cookie
The response should be an HTTP 302 redirection, there are three possible results:
- Redirect to the login of the Rescue Website -> if you don't have a valid session cookie, then first you have to log in and get a valid one, then retry the code request
- Redirect to the consent page -> first you have to give consent, then retry the code request
- You get a redirect URL where you get the authorization code as a query parameter named code. The code must be URL-decoded before use. The redirect URL also contains the state parameter. The value should be the same as the value sent in the request.
Authorization codes are valid for 10 minutes. If you get a redirection where the URL contains an error parameter, the request was unsuccessful. The value of the parameter indicates the problem.
Examples:
- Confidential client request:
-
curl --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/code? response_type=code&client_id=11&scope=Rescue;API&state=ku8765g&redirect_uri=https://my-url.-com/redirect' \ --header 'Cookie: ASP.NET_SessionId=tandfjtjmkuwtap0fibmrcof'
- Public client request:
-
curl --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/code? response_type=code&client_id=11&scope=Rescue;API&state=ku8765g&redirect_uri=https://my-url.-com/redirect&code_challenge_method=S256&code_challenge=51b6bf3f6a1ab4fa96d113cd602be39298cc4424aab84ed9cef3943db8dee0ef \ --header 'Cookie: ASP.NET_SessionId=tandfjtjmkuwtap0fibmrcof'
- Redirect response with code:
-
HTTP/1.1 302 Found Location: https://my-url.com/redirect?code=In0MSwVyISc1K-udA4Vkck9VlyvnKYkAz1liz5boaV27Gr9WTL_6WULxsKFjRbPSC5UVUs2FD1z7e0kSMnpojA&state=ku8765g
- Redirect response with error:
-
HTTP/1.1 302 Found Location: https://my-url.com/redirect?error=invalid_scope&error_description=scope_not_found
- Redirect to consent page response:
-
HTTP/1.1 302 Found Location: https://secure.logmeinrescue.com/id-srv-api/api/oauth/consent?state=ku8765g&client_name=TestClient&scope_name=Rescue;API&scope_description=RescueApi&return_url=https://secure.logmeinrescue.com/id-srv-api/api/oauth/code? response_type=code&client_id=11&scope=Rescue;API&state=ku8765g&redirect_uri=https://my-url.-com/redirect
2. Getting Access Token Using the Authorization Token
To request an access token, you have to call the https://secure.logmeinrescue.com/id-srv-api/api/oauth/token endpoint with the following details:
- HTTP method: POST
- HTTP body type (Content-Type header): application/x-www-form-urlencoded
- HTTP body parameters:
- grant_type: authorization_code
- code: the authorization code from the previous call
- client_id: the client ID used in the previous call
- client_secret: the client secret of the client (Optional)
- redirect_url: the redirect URL from the previous call
The response should be a JSON object containing the following:
- access_token: this must be used for authentication on the Rescue website
- refresh_token: this may be used to request another access token
- expires_in: the expiry of the access token in seconds
- token_type: always has the value Bearer, indicates that the access token should be used as a bearer
- token scope: the scope specified when requesting the authorization code
Access tokens remain valid for the duration specified in the "expires_in" field.
Examples:
- Confidential Client Request:
-
curl -X POST --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'code=In0MSwVyISc1K-udA4Vkck9VlyvnKYkAz1liz5boaV27Gr9WTL_6WULxsKFjRbPSC5UVUs2FD1z7e0kSMnpojA' \ --data-urlencode 'redirect_uri=https://my-url.-com/redirect' \ --data-urlencode 'client_id=11' \ --data-urlencode 'client_secret=$$$test_client_secret$$$'
- Public Client Request:
-
curl -X POST --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'code=In0MSwVyISc1K-udA4Vkck9VlyvnKYkAz1liz5boaV27Gr9WTL_6WULxsKFjRbPSC5UVUs2FD1z7e0kSMnpojA' \ --data-urlencode 'redirect_uri=https://my-url.-com/redirect' \ --data-urlencode 'client_id=11' \ --data-urlencode 'client_verifier=lfksnsoihjfi43isjks9'
- Successful Response
-
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjUwOTM0NDIiLCJjb21wYW55X2lkIjoiMTQ0MzgxOCIsInNjb3BlIjoiUmVzY3VlO0FQSSIsInJvbGUiOiJNYXN0ZXJBZG1pbmlzdHJhdG9yIiwiaXNfYWNjb3VudF9ob2xkZXIiOiJUcnVlIiwiZW1haWwiOiJub3JiZXJ0LnVncmFpQGdvdG8uY29tIiwiYWRtaW5faWQiOiIyNTA5MzQ0MiIsInRlY2hfaWQiOiIyNTA5MzQ0MyIsIm5hbWUiOiJOb3JiZXJ0IFVncmFpIiwia2lkIjoiMiIsImNsaWVudF9pZCI6IjcwIiwiZXhwIjoxNzI5MjY1OTI4LCJpc3MiOiJyZXNjdWUtb2F1dGgifQ.e7qAjOlDC6LTjT1WTY4Tb6W-SVFCpx6hzmRGlJD0Rd1MkVU0gHS53tocEQPIWh8E5IxtPh9s9d_3OEJ4uyJXZzRkMk195PeJZOjg1QMQJi0useVK8ChVKMv8-eur0-FrmMijGtxoqCsnO2_YyrLmhIXrzvvocqqbMmMhGIj6XDRQWeb_3AxG5qaSnlvqERrZ19DajWUYFNXeury7Bl2XgjCF5Wg83grwDXlNoaiOERy4DeKl3gqApp8vTnNi6Z2hNe4sOFHksxe_xCqQ9uVHEMpQEf9sVCM-4Bm9gt1oHG1nBut9-WC_d9Ho0b-h-19CfPS1_YQSdSmGlngRoLaY-g", "refresh_token": "IDBn2dTZf3dt0kqnsVxwotWoSRfFXJUXbFonbFH4z+Q9U9lRBD1rimaYq6dbb8E0EBNyUNxCA2qPcyLwB+66HQ==", "expires_in": 3600, "token_type": "Bearer", "scope": "Rescue;API" }
How to Use Client Credentials Flow?
This flow is not suitable for public clients, which cannot securely store client credentials. To use this flow, the client needs to be a Confidential Company Client.
To request an access token, you have to call the https://secure.logmeinrescue.com/id-srv-api/api/OAuth/token endpoint with the following details:
- HTTP method: POST
- HTTP body type (Content-Type header): application/x-www-form-urlencoded
- HTTP body parameters:
- grant_type: client_credentials
- client_id: the client's ID
- client_secret: the client secret of the client
- scope: a valid scope of the client
The response should be a JSON object containing the following:
- access_token: this must be used for authentication on the Rescue website
- refresh_token: this may be used to request another access token
- expires_in: the expiry of the access token in seconds
- token_type: always has the value Bearer, indicates that the access token should be used as a bearer
- token scope: the scope specified when requesting the authorization code
Access tokens remain valid for the duration specified in the "expires_in" field.
Examples:
- Request:
-
curl -X POST --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=Rescue;API' \ --data-urlencode 'client_id=11' \ --data-urlencode 'client_secret=$$$test_client_secret$$$'
- Response:
-
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjUwOTM0NDIiLCJjb21wYW55X2lkIjoiMTQ0MzgxOCIsInNjb3BlIjoiUmVzY3VlO0FQSSIsInJvbGUiOiJNYXN0ZXJBZG1pbmlzdHJhdG9yIiwiaXNfYWNjb3VudF9ob2xkZXIiOiJUcnVlIiwiZW1haWwiOiJub3JiZXJ0LnVncmFpQGdvdG8uY29tIiwiYWRtaW5faWQiOiIyNTA5MzQ0MiIsInRlY2hfaWQiOiIyNTA5MzQ0MyIsIm5hbWUiOiJOb3JiZXJ0IFVncmFpIiwia2lkIjoiMiIsImNsaWVudF9pZCI6IjcwIiwiZXhwIjoxNzI5MjY1OTI4LCJpc3MiOiJyZXNjdWUtb2F1dGgifQ.e7qAjOlDC6LTjT1WTY4Tb6W-SVFCpx6hzmRGlJD0Rd1MkVU0gHS53tocEQPIWh8E5IxtPh9s9d_3OEJ4uyJXZzRkMk195PeJZOjg1QMQJi0useVK8ChVKMv8-eur0-FrmMijGtxoqCsnO2_YyrLmhIXrzvvocqqbMmMhGIj6XDRQWeb_3AxG5qaSnlvqERrZ19DajWUYFNXeury7Bl2XgjCF5Wg83grwDXlNoaiOERy4DeKl3gqApp8vTnNi6Z2hNe4sOFHksxe_xCqQ9uVHEMpQEf9sVCM-4Bm9gt1oHG1nBut9-WC_d9Ho0b-h-19CfPS1_YQSdSmGlngRoLaY-g", "refresh_token": "IDBn2dTZf3dt0kqnsVxwotWoSRfFXJUXbFonbFH4z+Q9U9lRBD1rimaYq6dbb8E0EBNyUNxCA2qPcyLwB+66HQ==", "expires_in": 3600, "token_type": "Bearer", "scope": "Rescue;API" }
How to Use Refresh Token Flow?
To request an access token, follow these steps:
- Call the https://secure.logmeinrescue.com/id-srv-api/api/OAuth/token endpoint using the HTTP method POST.
- Set the Content-Type header to application/x-www-form-urlencoded.
- Set the HTTP body parameters as follows:
- grant_type: refresh_token
- refresh_token: received refresh token
- client_secret: the client secret of the client (Optional)
The response should be a JSON object containing the following:
- access_token: this must be used for authentication on the Rescue website
- refresh_token: this may be used to request another access token
- expires_in: the expiry of the access token in seconds
- token_type: always has the value Bearer, indicates that the access token should be used as a bearer
- token scope: the scope specified when requesting the authorization code
Access tokens remain valid for the duration specified in the "expires_in" field.
Examples:
- Confidential Client Request:
-
curl -X POST --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=refresh_token' \ --data-urlencode 'refresh_token=sF6RGAt4PEPihCLXWtPHeq8iUWStPcOu0RuruJLFC8wiKK+RBB4p7nBKt7YeOu+EKJCvRHTmMbd1bn/i/n17PA==' \ --data-urlencode 'client_secret=$$$test_client_secret$$$'
- Public Client Request:
-
curl -X POST --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=refresh_token' \ --data-urlencode 'refresh_token=sF6RGAt4PEPihCLXWtPHeq8iUWStPcOu0RuruJLFC8wiKK+RBB4p7nBKt7YeOu+EKJCvRHTmMbd1bn/i/n17PA=='
- Response:
-
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjUwOTM0NDIiLCJjb21wYW55X2lkIjoiMTQ0MzgxOCIsInNjb3BlIjoiUmVzY3VlO0FQSSIsInJvbGUiOiJNYXN0ZXJBZG1pbmlzdHJhdG9yIiwiaXNfYWNjb3VudF9ob2xkZXIiOiJUcnVlIiwiZW1haWwiOiJub3JiZXJ0LnVncmFpQGdvdG8uY29tIiwiYWRtaW5faWQiOiIyNTA5MzQ0MiIsInRlY2hfaWQiOiIyNTA5MzQ0MyIsIm5hbWUiOiJOb3JiZXJ0IFVncmFpIiwia2lkIjoiMiIsImNsaWVudF9pZCI6IjcwIiwiZXhwIjoxNzI5MjY1OTI4LCJpc3MiOiJyZXNjdWUtb2F1dGgifQ.e7qAjOlDC6LTjT1WTY4Tb6W-SVFCpx6hzmRGlJD0Rd1MkVU0gHS53tocEQPIWh8E5IxtPh9s9d_3OEJ4uyJXZzRkMk195PeJZOjg1QMQJi0useVK8ChVKMv8-eur0-FrmMijGtxoqCsnO2_YyrLmhIXrzvvocqqbMmMhGIj6XDRQWeb_3AxG5qaSnlvqERrZ19DajWUYFNXeury7Bl2XgjCF5Wg83grwDXlNoaiOERy4DeKl3gqApp8vTnNi6Z2hNe4sOFHksxe_xCqQ9uVHEMpQEf9sVCM-4Bm9gt1oHG1nBut9-WC_d9Ho0b-h-19CfPS1_YQSdSmGlngRoLaY-g", "refresh_token": "IDBn2dTZf3dt0kqnsVxwotWoSRfFXJUXbFonbFH4z+Q9U9lRBD1rimaYq6dbb8E0EBNyUNxCA2qPcyLwB+66HQ==", "expires_in": 3600, "token_type": "Bearer", "scope": "Rescue;API" }
How to Get Public Keys?
To obtain public keys from the issuing source, you have to call the https://secure.logmeinrescue.com/id-srv-api/api/OAuth/keys endpoint.
The keys are usually valid for at least a year and there is at least a six-month overlap of the validities of subsequent keys. It is recommended to refresh the list of keys at least monthly (e.g. using a CRON job) to ensure you always have the right keys for validating tokens.
The response should be a JSON object containing the following:
- Result
- Data: List of PublicKey object:
- KeyId
- Public
- ValidFrom
- ValidTo
Example:
- Request
-
curl --location 'https://secure.logmeinrescue.com/id-srv-api/api/oauth/keys'
- Response
-
HTTP 1.1 200 OK Content-Type: application/json; charset=UTF-8 { "Result": "Success", "Data": [ { "KeyId": "1", "Public": "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAtmwB9cKV77rGTHw+e9aN1Z/NvXiwIORdXjsSNX7IZ1C6JoxZ/Vb6\nsloeNyQ9E4fd7fdHbX/vGkCDJm1+DPl87JlD94/A0wmi1MXV2PcjetH1Hhswvlax\nLHfoUKhg2JpjxLGiSpwuTmFKIWxmwUvr3+4eAoW6a1U54Dr0a/SAafa+2Uz9adOk\nhljx5IWG9tsAcwc2DIb8YYg0uTmuJ3z0N7ot99u6h7i8Ukkcb6xdpbwRia3j9che\nHadEk9o1BUk2JZHkc+0hxFFyfMktmwiiIROUE6MgExKo1T6Sc6u/YMEhEP8kU7C1\nxevId/W+SLzERw8CBb0UG0C1tlwQdxOFeQIDAQAB\n-----END RSA PUBLIC KEY-----", "ValidFrom": "2024-07-02T12:50:40.9042248+00:00", "ValidTo": "2025-07-02T12:50:41.4474995+00:00" }, { "KeyId": "2", "Public": "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAtcET6RDM9LbsRs9CYTGLp7jac9RegU82ZgedYNvXREWJQupngCsP\nb3YSgR2U1NfmUEzsF3815mXe8K7IL7y8OL9EHE2jzRvmB4JInvDed30gaHo+/Nzt\nqoyT15EIT+x5ow14b7S192HUHP7aYBNEV6VgcVVtk3m/z13zGlxnzdmdyWeS8Ddr\nC3X7oyhpECw+wkTVbRw+ieIi43LeAaxySyUB0wJgdHMnGPABx9QjOIPtfBGLlWVC\n0/irtQqspPwlBLwiTdheKKkDN/pBsRwaXFH2rdW1PYh1bEdPFHNpQUQpLMZsb5VA\nAnP6TNGpV2vfrQgf6dSmFAHhVpPlheEYywIDAQAB\n-----END RSA PUBLIC KEY-----", "ValidFrom": "2024-07-02T12:51:55.669969+00:00", "ValidTo": "2026-01-02T12:51:55.9598027+00:00" } ] }
How to Manage Company Clients?
- Go to https://secure.logmeinrescue.com/id-srv/.
- Log in if needed, then click on "Company OAuth Clients" to view a list of company clients.
The following fields are displayed on the data grid:
- Client ID: A unique identifier used for requesting an authorization code and token.
- Client Name: The display name of the client.
- Redirect URL(s): Available endpoints to which the OAuth service can send the authorization code after the user has authenticated.
- Scopes: Available permissions that the client can request.
How to List Global Clients?
- Log in at https://secure.logmeinrescue.com/id-srv/
- Once logged in, click on "Global OAuth Clients" to view a list of global clients.
Account Information
logIn
Input Parameters
Element | Description |
---|---|
The email address of the Rescue account that you want to log in. Required. | |
pwd | The password of the corresponding Rescue account. Required. |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred. |
OK | The user successfully logged in. |
INVALID | Login failed because at least one of the input values is incorrect. |
LIMITREACHED | The logIn method was called more than ten times in three minutes.
Note: If you want to log in more often, use the requestAuthCode API method. Once you are logged in, the authcode prevents you from logging out if there is a timeout.
|
Sample Code
The following are examples for using the logIn method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/login.aspx?email=some@email.com&pwd=secretPassword
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/login.aspx">
<input name="email" value="some@email.com">
<input name="pwd" value="secretPassword">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=login.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/login.aspx";
string sEmail = "some@email.com";
string sPwd = "secretPassword";
System.Net.HttpWebRequest oReq =
(System.Net.HttpWebRequest)System.Net.WebRequest.Create(sEndpoint + "?email="
+ sEmail + "&pwd=" + sPwd);
System.Net.HttpWebResponse oResp = (System.Net.HttpWebResponse)oReq.GetResponse();
string sResp = new System.IO.StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write(sResp); //You can customize the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API Login Test</title>
</head>
<body>
</body>
</html>
C# with SOAP
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System"%>
<%@ Import Namespace="System.Net"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Rescue API Login Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%
//create a proxy for the SOAP requests
WebServiceClients.API proxy = new WebServiceClients.API();
//set up variables
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//Initiate an API login
WebServiceClients.loginRet loginResult = proxy.login(sEmail,sPwd);
Response.Write(loginResult);
%>µ
</div>
</form>
</body>
</html>
logOut
Input Parameters
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred. |
OK | The user successfully logged out. |
NOTLOGGEDIN | Logout failed because the user is no longer logged in. |
Sample Code
The following are examples for using the logOut method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/logout.aspx
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/logout.aspx">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=logout.
PHP with SOAP
<?php
$soapclient = new SoapClient("https://secure.logmeinrescue.com/api/api.asmx?wsdl");
//log out
$logoutResult = $soapclient->logout();
//print the result
echo "<b>Logout full response.</b><br />"; //formatting
print_r($logoutResult);
echo "<br /><br />"; //formatting
?>
C# with HttpWebRequest
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/logout.aspx";
System.Net.HttpWebRequest oReq = (System.Net.HttpWebRequest)
System.Net.WebRequest.Create(sEndpoint);
System.Net.HttpWebResponse oResp = (System.Net.HttpWebResponse)oReq.GetResponse();
string sResp = new System.IO.StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write(sResp); //You can customize the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue Single Sign On Login Test</title>
</head>
<body>
</body>
</html>
C# with SOAP
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 APIexamples.WebServiceClients;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
WebServiceClients.API proxy = new WebServiceClients.API();
WebServiceClients.logoutRet oLogout = proxy.logout();
Response.Write(oLogout.ToString());
}
}
}
getAccount
Input Parameters
Element | Description |
---|---|
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK AccountID:560961 Organization:Company AdminID:337365 TechID:337366
Email:jdoe@company.com
Element | Description |
---|---|
AccountID | Rescue account ID |
Organization | Name of the account holder's organization |
AdminID | Administrator ID of the current user
Note: If the current user is not an Administrator, AdminID contains 0.
|
TechID | Technician ID of the current user
Note: If the current user has no technician seat (or his technician seat is disabled), TechID contains 0.
|
Email address of the account holder |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | The properties of the currently logged-in user's account were successfully retrieved. |
NOTLOGGEDIN | Retrieving information failed because the user is no longer logged in. |
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 getAccount method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getAccount.aspx?authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getAccount.aspx">
<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=getAccount.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$accountParams = array("");
$accountResult = $soapclient->getAccount($accountParams);
//print out the hierarchy full response
print_r("<b>getAccount full response.</b><br />");
print_r($accountResult);
echo "<br /><br />"; //formatting
//show the account info
$accountID = $accountResult["iAccountID"];
$organization = $accountResult["sOrganization"];
$adminID = $accountResult["iAdminID"];
$techID = $accountResult["iTechID"];
$email = $accountResult["sEmail"];
print_r("<b>Account Information.</b>");
print_r("<table border = \"0\">");
print_r("<tr><td>" . "Account ID: </td><td>" . $accountID . "</td></tr>");
print_r("<tr><td>" . "Organization: </td><td>" . $organization . "</td></tr>");
print_r("<tr><td>" . "Admin ID: </td><td>" . $adminID . "</td></tr>");
print_r("<tr><td>" . "Tech ID: </td><td>" . $techID . "</td></tr>");
print_r("<tr><td>" . "Email: </td><td>" . $email . "</td></tr>");
print_r("</table>");
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/";
//add actionName.aspx? for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//sAuthCode is the return value of the requestAuthCode API call
string sAuthCode = "";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the account info
HttpWebRequest oReqAccount = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getAccount.aspx?authcode=");
oReqAccount.CookieContainer = sessioncookie;
HttpWebResponse oRespAccount = (HttpWebResponse)oReqAccount.GetResponse();
string sRespAccount = new StreamReader(oRespAccount.GetResponseStream()).ReadToEnd();
Response.Write("getAccount result: " + sRespAccount + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API getAccount Test</title>
</head>
<body>
</body>
</html>
C# with SOAP
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 APIexamples.WebServiceClients;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEmail = "your@email.com"; //Rescue account email address
string sPwd = "secretpassword"; //Rescue account password
//Set up empty data for getAccount response
int iAccount;
string sOrg;
int iAdmin;
int iTech;
string sAcctEmail;
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write("Login: " + oLogin + "<br />");
WebServiceClients.getAccountRet oGetAccount = proxy.getAccount(out iAccount,
out sOrg, out iAdmin, out iTech, out sEmail1);
Response.Write(oGetAccount.ToString());
Response.Write("Account ID: " + iAccount + "<br />" + "Organization ID: "
+ sOrg + "<br />" + "Admin ID: " + iAdmin + "<br />" + "Technician ID: " + iTech + "<br />"
+ "Email: " + sAcctEmail);
}
}
}
getHierarchy
Input Parameters
Element | Description |
---|---|
isnode | The returned set is a node or the complete hierarchy. Optional. The possible value are as follows:
|
node | Contains the ID of the node if the value of the isnode parameter is true. Optional. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NodeID:671835 ParentID:337364 Name:Technician
Email:jdoe@company.com Description: Status:Offline Type:Technician
NodeID: ID of the Rescue nodeParentID: ID of the node's parent nodeName: Name of the nodeEmail: If available, the email address of the nodeDescription: Description of the nodeStatus: Status of the node as listed belowType: Type of the node as listed below
The following node statuses are available:
- Disabled
- Offline
- Online
- Busy
- Away
The following node types are available:
- Root
- Masteradministrators
- Administrators
- Technicians
- AdministratorGroup
- TechnicianGroup
- Masteradministrator
- Administrator
- Technician
- AdministratorLink
- AdministratorGroupLink
- Channel
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving the properties of the currently logged-in user's account succeeded. |
NOTLOGGEDIN | Retrieving information failed because the user is no longer logged in. |
INVALIDPARAM_ISNODE | The isnode parameter is incorrect. |
INVALIDPARAM_NODE | The isnode parameter is set to true and the node parameter is incorrect. |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user is deleted or disabled. |
HAS_NO_RIGHT | The specified user (node) does not have sufficient rights to retrieve the hierarchy of the Rescue account. |
Sample Code
The following are examples for using the getHierarchy method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getHierarchy.aspx?isnode=true&node=337364
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getHierarchy.aspx">
<input name="isnode" value="true">
<input name="node" value="337364">
<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=getHierarchy.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
$hierparams = array("" => "");
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//getHierarchy
$hierarchyResult = $soapclient->getHierarchy($hierparams);
//print out the hierarchy full response
echo "<b>Hierarchy full response.</b><br />";
print_r($hierarchyResult);
echo "<br /><br />"; //formatting
//hierarchy array
$hierarchy = $hierarchyResult['aHierarchy'];
//nodes of the hierarchy
$nodes = $hierarchy["HIERARCHY"];
$numberofnodes = count($nodes);
echo "<b>Hierarchy on it's own.</b><br />";
print_r($hierarchy["HIERARCHY"]);
echo "<br /><br />"; //formatting
//now format the hierarchy
print_r("<b>" . "Formatted selection of hierarchy." . "</b>");
echo "<br />"; //formatting
echo "<table border =\"0\" cellspacing = \"5\">";
for ($iNodes = 0; $iNodes < $numberofnodes; $iNodes += 1)
{
print_r("<tr>");
print_r("<td>" . "Name: " . $nodes[$iNodes]["sName"] . "<br /></td>");
print_r("<td>" . "Email: <a href=\"mailto:" . $nodes[$iNodes]["sEmail"] . "\">"
. $nodes[$iNodes]["sEmail"] . "</a><br /></td>");
print_r("<td>" . "Role: " . $nodes[$iNodes]["eType"]) . "</td>";
print_r("</td>");
}
print_r("</table>");
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//sAuthCode is the return value of the requestAuthCode API call
string sAuthCode = "";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the Hierarchy info
HttpWebRequest oReqHierarchy = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getHierarchy.aspx?isnode=true&node=337364&authcode=");
oReqHierarchy.CookieContainer = sessioncookie;
HttpWebResponse oRespHierarchy = (HttpWebResponse)oReqHierarchy.GetResponse();
string sRespHierarchy = new StreamReader(oRespHierarchy.GetResponseStream()).ReadToEnd();
Response.Write("getHierarchy result: " + sRespHierarchy + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API Login Test</title>
</head>
<body>
</body>
</html>
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using APIexamples.WebServiceClients;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEmail = "some@email.com"; //Rescue account email address
string sPwd = "secretPassword"; //Rescue account password
int iNode = 337364; //Node ID of which to getHierarchy
HIERARCHY[] aHierarchy; //Setup empty array for getHierarchy response
DataTable dt = new DataTable(); //Setup DataTable for display
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write("Login: " + oLogin + "<br />");
//getHierarchy
WebServiceClients.getHierarchyRet oGetHierarchy = proxy.getHierarchy(false,
iNode, out aHierarchy);
Response.Write(oGetHierarchy.ToString());
//Bind return data to GridView
gridView1.DataSource = aHierarchy;
gridView1.DataBind();
}
}
}
getHierarchy_v2
Changes in Version 2 of getHierarchy
- filteroffline has been added as new input parameter.
Input Parameters
Element | Description |
---|---|
isnode | The returned set is a node or the complete hierarchy. Optional. The possible value are as follows:
|
node | Contains the ID of the node if the value of the isnode parameter is true. Optional. |
filteroffline | Filters offline technicians from the hierarchy. Optional. The possible value are as follows:
Note: This parameter does not filter offline nodes that are not technicians.
|
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NodeID:337364 ParentID:337363 Name:Technician Group1 Email: Description:
Status:Offline Type:TechnicianGroup
NodeID: ID of the Rescue nodeParentID: ID of the node's parent nodeName: Name of the nodeEmail: If available, the email address of the nodeDescription: Description of the nodeStatus: Status of the node as listed belowType: Type of the node as listed below
The following node statuses are available:
- Disabled
- Offline
- Online
- Busy
- Away
The following node types are available:
- Root
- Masteradministrators
- Administrators
- Technicians
- AdministratorGroup
- TechnicianGroup
- Masteradministrator
- Administrator
- Technician
- AdministratorLink
- AdministratorGroupLink
- Channel
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving the properties of the currently logged-in user's account succeeded. |
NOTLOGGEDIN | Retrieving information failed because the user is no longer logged in. |
INVALIDPARAM_ISNODE | The isnode parameter is incorrect. |
INVALIDPARAM_NODE | The isnode parameter is set to true and the node parameter is incorrect. |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user is deleted or disabled. |
HAS_NO_RIGHT | The specified user (node) does not have sufficient rights to retrieve the hierarchy of the Rescue account. |
Sample Code
The following are examples for using the getHierarchy_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getHierarchy_v2.aspx?isnode=true&node=337364
&filteroffline=true&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getHierarchy_v2.aspx">
<input name="isnode" value="true">
<input name="node" value="337364">
<input name="filteroffline" value="true">
<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=getHierarchy_v2.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
$hierparams = array("" => "");
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//getHierarchy
$hierarchyResult = $soapclient->getHierarchy_v2($hierparams);
//print out the hierarchy full response
echo "<b>Hierarchy full response.</b><br />";
print_r($hierarchyResult);
echo "<br /><br />"; //formatting
//hierarchy array
$hierarchy = $hierarchyResult['aHierarchy'];
//nodes of the hierarchy
$nodes = $hierarchy["HIERARCHY"];
$numberofnodes = count($nodes);
echo "<b>Hierarchy on it's own.</b><br />";
print_r($hierarchy["HIERARCHY"]);
echo "<br /><br />"; //formatting
//now format the hierarchy
print_r("<b>" . "Formatted selection of hierarchy." . "</b>");
echo "<br />"; //formatting
echo "<table border =\"0\" cellspacing = \"5\">";
for ($iNodes = 0; $iNodes < $numberofnodes; $iNodes += 1)
{
print_r("<tr>");
print_r("<td>" . "Name: " . $nodes[$iNodes]["sName"] . "<br /></td>");
print_r("<td>" . "Email: <a href=\"mailto:" . $nodes[$iNodes]["sEmail"] . "\">"
. $nodes[$iNodes]["sEmail"] . "</a><br /></td>");
print_r("<td>" . "Role: " . $nodes[$iNodes]["eType"]) . "</td>";
print_r("</td>");
}
print_r("</table>");
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//sAuthCode is the return value of the requestAuthCode API call
string sAuthCode = "";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the Hierarchy info
HttpWebRequest oReqHierarchy = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getHierarchy_v2.aspx?isnode=true&node=337364&authcode=");
oReqHierarchy.CookieContainer = sessioncookie;
HttpWebResponse oRespHierarchy = (HttpWebResponse)oReqHierarchy.GetResponse();
string sRespHierarchy = new StreamReader(oRespHierarchy.GetResponseStream()).ReadToEnd();
Response.Write("getHierarchy_v2 result: " + sRespHierarchy + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API Login Test</title>
</head>
<body>
</body>
</html>
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using APIexamples.WebServiceClients;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEmail = "your@email.com"; //Rescue account email address
string sPwd = "secretpassword"; //Rescue account password
int iNode = 12345678; //Node ID of which to getHierarchy
HIERARCHY[] aHierarchy; //Setup empty array for getHierarchy_v2 response
DataTable dt = new DataTable(); //Setup DataTable for display
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write("Login: " + oLogin + "<br />");
//getHierarchy
WebServiceClients.getHierarchy_v2Ret ogetHierarchy_v2 = proxy.getHierarchy_v2(false,
iNode, out aHierarchy);
Response.Write(ogetHierarchy_v2.ToString());
//Bind return data to GridView
gridView1.DataSource = aHierarchy;
gridView1.DataBind();
}
}
}
Account Management
createUser
Input Parameters
Element | Description |
---|---|
parent | The ID of the parent node that must be Master Administrator, Administrator, or Technician Group. Required. |
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 [new person nodeid] | Creating a new Rescue user with the displayed ID succeeded. |
NOTLOGGEDIN | Creating a new Rescue user failed because the current user is no longer logged in. |
INVALIDPARAM_PARENT | The ID of the parent group is incorrect either because it does not exist or because it is an incorrect group type. For example, a technician can only be created in a Technician Group, but not in a channel. |
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 createUser method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/createUser.aspx?parent=337364&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/createUser.aspx">
<input name="parent" value="337364">
<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=createUser.
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'
);
$createuserparams = array (
'iParentID' => 337364,
'sAuthCode' => ''
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$createUserResult = $soapclient->createUser($createuserparams);
$newUser = $createUserResult['iNewNodeID'];
print_r($createUserResult . " New user node: " . $newUser);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace createUser
{
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";
string sAuthCode = "";
//Authenticate Rescue credentials
HttpWebRequest oReq =
(HttpWebRequest)WebRequest.Create(sEndpoint + "login.aspx" + "?email="
+ sEmail + "&pwd=" + sPwd);
//Create session cookie to carry login credentials
oReq.CookieContainer = new CookieContainer();
//Get response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write(sResp + "<br />");
//Add cookie to CookieContainer
CookieContainer sessioncookie = oReq.CookieContainer;
//Define ID of parent node
string pNode = [ID of parent node];
//Create user
HttpWebRequest oReq1 =
(HttpWebRequest)WebRequest.Create(sEndpoint + "createUser.aspx"
+ "?parent=" + pNode + "&authcode=" sAuthCode);
oReq1.CookieContainer = sessioncookie;
HttpWebResponse oResp1 = (HttpWebResponse)oReq1.GetResponse();
string sResp1 = new System.IO.StreamReader(oResp1.GetResponseStream())
.ReadToEnd();
Response.Write(sResp1 + "<br />");
}
catch (Exception ex)
{
defaultError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using API.WebServiceClients;
namespace API
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
int iParentID = [ID of parent node];
int iNewNodeID;
//Create user
WebServiceClients.createUserRet createResult = proxy.createUser(iParentID,
sAuthCode, out iNewNodeID);
Response.Write(iNewNodeID);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
createUsers
Input Parameters
Element | Description | |
---|---|---|
USERDATA[] | An array containing the parameters of the new users. These parameters are described in details below.
Note: You cannot add external technicians.
|
|
uniqueid | The temporary ID of the new user. Required.
Note: Rescue automatically assigns a permanent node ID to each new user after the userdata array is validated.
|
|
parentid | The ID of the parent group. Required.
Depending on what type of users you want to create, you must define the ID of their parent group:
Note: If you want to add users to a new user group, first you must create that group as described in createGroup.
|
|
name | The name of the user. Required.
Note: For special characters, use URL encoding.
|
|
nick | The nickname of the user. Optional. | |
The email address of the user. Required.
Note: You cannot use the email address of an existing Administrator or Master Administrator to create a Technician.
|
||
ssoid | The Single Sign On ID of the user. Optional. | |
pwd | The password of the user. Required. | |
confpwd | The confirmation password. Required. | |
status | The status of the user. Optional.
The possible values are as follows:
|
|
description | The description of the user. Optional. | |
addons | Specifies whether the user has mobile addon. Required.
The possible values are as follows:
|
|
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Return Values
The return values contain the result of the user creation process itself in the state field and the details of creating the individual users in the other fields.
A user is created in Rescue if the creation process succeeds and a nodeID is created for the new user. If there is an error in the userStatus field, then the user is still created and you should update the details of the user to ensure that it is properly set up.
Displayed Return Value | Description | |
---|---|---|
state | The status of processing the new users. Possible values are described below. | |
OK | Adding all users in the provided list succeeded. | |
PARTIALLY_PROCESSED | Not all users were successfully created. | |
ERROR | No users were created due to an unspecified error, such as timeout. The details of failure are listed in the userState field for the individual users. | |
NOTLOGGEDIN | Adding users failed because the current user is no longer logged in. | |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. | |
USER_DELETED_OR_DISABLED | The administrator who tried to add users is deleted or disabled. | |
UNIQUE_ID_NOT_UNIQUE | At least one of the specified user IDs (uniqueid) is already taken. | |
INVALIDPARAM_EMAIL_ALREADY_IN_USE | At least one of the specified email addresses is not unique. | |
SSO_ID_ALREADY_EXISTS | The specified SSOID is already assigned to another newly created user. | |
UNKNOWN_ERROR | Some or all users were not created due to an unspecified error. |
The following information is returned about the individual users:
Displayed Return Value | Description | |
---|---|---|
nodeId | The ID of the new user. If creating the user failed, then its nodeId is 0. | |
uniqueId | The temporary ID of the new user that was used during the import process. | |
userState | The status of processing a specific user. Possible values are described below. | |
OK | Adding the user succeeded. | |
ERROR | The user was not created due to an unspecified error, such as timeout. | |
INVALIDPARAM_PARENTID | The ID of the parent group is incorrect either because it does not exist or because it is an incorrect group type. For example, a technician can only be created in a Technician Group, but not in a channel. | |
ACCESS_DENIED | You do not have permission to create users in the specified group. | |
INVALIDPARAM_PARENTID_IS_ZERO_OR_LESS | The specified parent group ID is zero or a negative number. | |
INVALIDPARAM_NAME | The name is more than 128 characters long or the field is empty. | |
INVALIDPARAM_NICK | The name is more than 128 characters long. | |
INVALIDPARAM_DESCRIPTION | The description is more than 1024 characters long. | |
INVALIDPARAM_EMAIL | The email address of the user has an incorrect format or it is more than 128 characters long. | |
INVALIDPARAM_EMAIL_ALREADY_IN_USE | The specified email address is already in use. | |
INVALIDPARAM_PASSWORD_CANNOT_CONTAIN_ WHITESPACE_CHARACTERS | One of the password fields contains an extra space. | |
INVALIDPARAM_PASSWORD_HAS_TO_BE_AT_LEAST_ 8_CHARACTERS_LONG | The new password must be at least 8 characters in length. | |
INVALIDPARAM_PASSWORD_HAS_TO_CONTAIN_AT_ LEAST_TWO_UPPERCASE_LETTERS_OR_SPECIAL_ CHARACTERS | The new password must contain at least 2 characters that are either uppercase or special characters. | |
INVALIDPARAM_PASSWORD_DOES_NOT_MEET_THE_ MINIMUM_PASSWORD_STRENGHT_REQUIREMENTS | The Password Strength meter must meet the pre-defined minimum requirements. | |
INVALIDPARAM_NEW_PASSWORDS_DO_NOT_MATCH | The new and the confirmation passwords do not match. | |
INVALIDPARAM_CURRENT_PASSWORD_IS_WRONG | The current password of the user is incorrect. | |
INVALIDPARAM_MISSING_CONFIRMATION_PASSWORD | The confirmation password field cannot be empty. | |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard or mobile licenses available. | |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_PARENT_ NODE_IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. | |
USER_DELETED_OR_DISABLED | The administrator who tried to add users is deleted or disabled. | |
CREATED_BUT_NOTIFICATION_EMAIL_NOT_SENT | Notification email was not sent to the Administrator who created the users. | |
SSO_ID_ALREADY_EXISTS | The specified SSOID is already taken by an existing Rescue user. | |
INVALIDPARAM_UNIQUEID_IS_ZERO_OR_LESS | The specified user ID is zero or a negative number. | |
INVALIDPARAM_PASSWORD_MISSING | One of the passwords is not defined. | |
INVALIDPARAM_EMAIL_MISSING | The email address of the user is not defined. |
Sample Code
The following are examples for using the createUsers method that you can call in your environment.
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=createUsers.
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createUsers.APIServiceReference;
namespace Rescue.API
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
APIServiceReference.APISoapClient proxy = new APIServiceReference.
APISoapClient("APISoap12");
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = string.Empty;
APIServiceReference.requestAuthCodeRet authCodeRet = proxy.requestAuthCode(out
sAuthCode, sEmail, sPwd);
if (authCodeRet != APIServiceReference.requestAuthCodeRet.requestAuthCode_OK)
{
Response.Write("Auth code missing: " + authCodeRet + "<br />");
return;
}
int iParent = [ID of the parent node];
int iUId = 0;
APIServiceReference.USERDATA userDataFirst = new APIServiceReference.USERDATA
{
iUniqueId = ++iUId,
iParentID = iParent,
sName = "John Doe",
sNick = "JDoe",
sEmail = "jdoe@company.com",
sSSOID = "123456",
sPwd = "secretPassword",
sConfPwd = "secretPassword",
eStatus = APIServiceReference.nodeStatus.Enabled,
sDescription = "Admin",
eAddOns = APIServiceReference.hasMobileAddon.False
};
APIServiceReference.USERDATA userDataSecond = new APIServiceReference.USERDATA
{
iUniqueId = ++iUId,
iParentID = iParent,
sName = "Jane Doe",
sNick = "JaneDoe",
sEmail = "janedoe@company.com",
sSSOID = "654321",
sPwd = "secretPassword",
sConfPwd = "secretPassword",
eStatus = APIServiceReference.nodeStatus.Enabled,
sDescription = "Admin",
eAddOns = APIServiceReference.hasMobileAddon.False
};
APIServiceReference.CREATEUSERSINFO ret = sAPI.createUsers(new[] { userDataFirst,
userDataSecond }, sAuthCode);
Response.Write(ret.state.ToString());
if (ret.createUserInfos.Length > 0)
{
Response.Write(ret.createUserInfos[0].userState + "<br />" +
ret.createUserInfos[0].iNodeId);
}
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getUser
Input Parameters
Element | Description |
---|---|
node | The ID of the user whose information you want to retrieve. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NODEID: 337366 NAME: John Doe NICK: EMAIL: jdoe@company.com SSOID: DESCRIPTION:
TYPE: Technician HASMOBILEADDON: False ISACCOUNTHOLDER: True STATUS: Online
NODEID: ID of the user whose information you want to retrieveNAME: UsernameNICK: Nickname of the userEMAIL: User's emailSSOID: Single Sign On ID of the userDESCRIPTION: User's descriptionTYPE: Type of the user, which is either Technician, Administrator, or MasterAdministratorHASMOBILEADDON: Displays whether the user has mobile addonISACCOUNTHOLDER: Displays whether the user is an account holderSTATUS: Status of the user
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user succeeded. |
NOTLOGGEDIN | Retrieving information about a user failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user. |
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 getUser method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getUser.aspx?node=337366&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getUser.aspx">
<input name="node" value="337366">
<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=getUser.
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'
);
$iNodeID = 337366;
$getuserparams = array (
'iNodeID' => $iNodeID,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$getUserResult = $soapclient->getUser($getuserparams);
print_r($getUserResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace getUser
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEndpoint = "https://secure.logmeinrescue.com/api/";
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = 337366;
string sAuthCode = "4ahx...80u0";
HttpWebRequest oLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oLogin.CookieContainer = new CookieContainer();
HttpWebResponse oLoginResp = (HttpWebResponse)oLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream()).ReadToEnd();
Response.Write(sLoginResp);
CookieContainer sessioncookie = oLogin.CookieContainer;
HttpWebRequest oReq = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "getUser.aspx" + "?node=" + iNode + "&authcode=" + sAuthCode);
oReq.CookieContainer = sessioncookie;
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write(sResp);
}
}
}
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using API.WebServiceClients;
namespace getUser
{
public partial class WebForm1 : 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";
string sAuthCode = "4ahx...80u0";
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
int iNodeID = [ID of node in which information is being retrieved];
User oUser = new User();
WebServiceClients.getUserRet getResult = proxy.getUser(iNodeID, sAuthCode,
out oUser);
Response.Write(getResult + oUser.sName + oUser.sEmail [etc...]);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getUser_v2
Changes in Version 2 of getUser
The following has been introduced in the getUser_v2 method:
- HASRPATADDON has been added as new output parameter.
Input Parameters
Element | Description |
---|---|
node | The ID of the user whose information you want to retrieve. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NODEID: 337366 NAME: John Doe NICK: EMAIL: jdoe@company.com SSOID: DESCRIPTION:
TYPE: Technician HASMOBILEADDON: False HASRPATADDON: True ISACCOUNTHOLDER: True STATUS: Online
NODEID: ID of the user whose information you want to retrieveNAME: UsernameNICK: Nickname of the userEMAIL: User's emailSSOID: Single Sign On ID of the userDESCRIPTION: User's descriptionTYPE: Type of the user, which is either Technician, Administrator, or MasterAdministratorHASMOBILEADDON: Displays whether the user has mobile addonHASRPATADDON: Displays whether the user has RPAT addonISACCOUNTHOLDER: Displays whether the user is an account holderSTATUS: Status of the user
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user succeeded. |
NOTLOGGEDIN | Retrieving information about a user failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user. |
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 getUser_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getUser_v2.aspx?node=337366&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getUser_v2.aspx">
<input name="node" value="337366">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
int iNodeID = [ID of node in which information is being retrieved];
User_V2 oUserV2 = new User_V2();
//Get user data
WebServiceClients.getUserRet_v2 createResult = proxy.getUser_v2(iNodeID, sAuthCode, out oUserV2);
Response.Write(createResult + oUserV2.sName + oUserV2.sEmail [etc...]);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getUser_v3
Changes in Version 3 of getUser
The following has been introduced in the getUser_v3 method:
- email has been added as new input parameter.
Input Parameters
Element | Description |
---|---|
node | The ID of the user whose details you want to retrieve. Required.
Important: You must use either the node or the email parameter to retrieve user information.
|
The email address of the user whose details you want to retrieve. Required.
Important: You must use either the node or the email parameter to retrieve user information.
|
|
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NODEID: 337366 NAME: John Doe NICK: EMAIL: jdoe@company.com SSOID: DESCRIPTION:
TYPE: Technician HASMOBILEADDON: False HASRPATADDON: True ISACCOUNTHOLDER: True STATUS: Online
NODEID: ID of the user whose information you want to retrieveNAME: UsernameNICK: Nickname of the userEMAIL: User's emailSSOID: Single Sign On ID of the userDESCRIPTION: User's descriptionTYPE: Type of the user, which is either Technician, Administrator, or MasterAdministratorHASMOBILEADDON: Displays whether the user has mobile addonHASRPATADDON: Displays whether the user has RPAT addonISACCOUNTHOLDER: Displays whether the user is an account holderSTATUS: Status of the user
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user succeeded. |
NOTLOGGEDIN | Retrieving information about a user failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user. |
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 getUser_v3 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getUser_v3.aspx?email=jdoe@company.com
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getUser_v3.aspx">
<input name="email" value="jdoe@company.com">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
int iNodeID = [ID of node in which information is being retrieved];
User_V2 oUserV2 = new User_V2();
//Get user data
WebServiceClients.getUserRet_v2 createResult = proxy.getUser_v3(iNodeID, sAuthCode, out oUserV2);
Response.Write(createResult + oUserV2.sName + oUserV2.sEmail [etc...]);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
setUser
Input Parameters
Element | Description |
---|---|
node | The ID of the parent node. Required. |
name | The name of the user. Required. |
nick | The nick of the user. Optional. |
The email address of the user. Required. | |
ssoid | The Single Sign On ID of the user. Optional. |
pwd | The password of the user. Optional. |
confpwd | The confirmation password. Optional. |
oldpwd | The old password of the user. Optional. |
status | The status of the user. Required.
The possible values are as follows:
|
description | The description of the user. Optional. |
addons | Specifies whether the user has mobile addon. Required.
The possible values are as follows:
|
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 | Updating user properties succeeded. |
NOTLOGGEDIN | Updating user properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_MOBILEADDON | The mobile addon of the user is incorrectly specified. |
INVALIDPARAM_EMAIL | The email address of the use has an incorrect format. |
INVALIDPARAM_EMAIL_ALREADY_IN_USE | The specified email address is already in use. |
INVALIDPARAM_MISSING_CURRENT_PASSWORD | The current password is not defined. This error only occurs when Master administrators update their own user properties. |
INVALIDPARAM_PASSWORD_CANNOT_CONTAIN_ WHITESPACE_CHARACTERS | One of the password fields contain an extra space. |
INVALIDPARAM_PASSWORD_HAS_TO_BE_AT_LEAST_ 8_CHARACTERS_LONG | The new password must be at least eight characters in length. |
INVALIDPARAM_PASSWORD_HAS_TO_CONTAIN_AT_LEAST_ TWO_UPPERCASE_LETTERS_OR_SPECIAL_CHARACTERS | The new password must contain at least two characters that are either uppercase or special characters. |
INVALIDPARAM_PASSWORD_LENGTH_HAS_TO_BE_BIGGER_ THAN_ZERO | The password fields cannot be empty. |
INVALIDPARAM_PASSWORD_DOES_NOT_MEET_THE_MINIMUM_ PASSWORD_STRENGHT_REQUIREMENTS | The Password Strength meter must meet the pre-defined minimum requirements. |
INVALIDPARAM_NEW_PASSWORDS_DO_NOT_MATCH | The new and the confirmation passwords do not match. |
INVALIDPARAM_CURRENT_AND_NEW_PASSWORD_MATCH | The current and the new passwords cannot match. |
INVALIDPARAM_CURRENT_PASSWORD_IS_WRONG | The current password of the user is incorrect. |
INVALIDPARAM_MISSING_CONFIRMATION_PASSWORD | The confirmation password field cannot be empty. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard or mobile licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_PARENT_NODE_ IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
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 setUser method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setUser.aspx?node=337366&name=John Doe&nick=JDoe
&email=jdoe@company.com&ssoid=123456&pwd=secretPassword&confpwd=secretPassword
&oldpwd=oldPassword&status=enabled&description=Admin&addons=true&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setUser.aspx">
<input name="node" value="337366">
<input name="name" value="John Doe">
<input name="nick" value="JDoe">
<input name="email" value="jdoe@company.com">
<input name="ssoid" value="123456">
<input name="pwd" value="secretPassword">
<input name="confpwd" value="secretPassword">
<input name="oldpwd" value="oldPassword">
<input name="status" value="enabled">
<input name="description" value="Admin">
<input name="addons" value="true">
<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=setUser.
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'
);
$iNodeID = 123456;
$sName = "John Doe";
$sNick = "JDoe";
$sEmail = "jdoe@company.com";
$sSSOID = "123456";
$sPwd = "secretPassword";
$sConfPwd = "secretPassword";
$sOldPwd = "oldPassword";
$eStatus = Enabled;
$sDescription = "Admin";
$eAddons = true;
$sAuthCode = "4ahx...80u0";
$setuserparams = array (
'iNodeID' => $iNodeID,
'sName' => $sName,
'sNick' => $sNick,
'sEmail' => $sEmail,
'sSSOID' => $sSSOID,
'sPwd' => $sPwd,
'sConfPwd' => $sConfPwd,
'sOldPwd' => $sOldPwd,
'eStatus' => $eStatus,
'sDescription' => $sDescription,
'eAddons' => $eAddons,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$setUserResult = $soapclient->setUser($setuserparams);
print_r($setUserResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace setUser
{
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";
string sNode = "ID of node being updated";
string sName = "Name of user";
string sNick = "Nick name of user";
string sTechEmail = "Email address of user";
string sSSOID = "Single Sign On ID of user";
string sTechPwd = "New password";
string sConfPwd = "Password confirmation";
string sOldPwd = "Old password";
string sStatus = "Status of node (Enabled | Disabled)";
string sDescr = "Description of user";
string sAddons = "Has mobile addons (True | False)";
string sAuthCode = "";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream()).ReadToEnd();
Response.Write(sRespLogin + "<br />");
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebRequest oReqSetUser = (HttpWebRequest)WebRequest.Create(sEndpoint +
"setuser.aspx" + "?node=" + sNode + "&name=" + sName + "&nick=" + sNick + "&email="
+ sTechEmail + "&ssoid=" + sSSOID + "&pwd=" + sTechPwd + "&confpwd=" + sConfPwd + "&oldpwd="
+ sOldPwd + "&status=" + sStatus + "&description=" + sDescr + "&addons=" + sAddons
+ "&authcode=" + sAuthCode);
oReqSetUser.CookieContainer = sessioncookie;
HttpWebResponse oRespSetUser = (HttpWebResponse)oReqSetUser.GetResponse();
string sRespSetUser = new StreamReader(oRespSetUser.GetResponseStream())
.ReadToEnd();
Response.Write(sRespSetUser + "<br />");
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using setUser.WebServiceClients;
namespace setUser
{
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 iNode = Node ID of user being modified;
string sName = "Name of user";
string sNick = "Nick name of user";
string sTechEmail = "Email address of user";
string sSSOID = "Single Sign On ID of user";
string sTechPwd = "New password";
string sConfPwd = "Password confirmation";
string sOldPwd = "Old password";
string sDescr = "Description of user";
string sAuthCode = "";
WebServiceClients.API proxy = new WebServiceClients.API();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.setUserRet setUserReturn = proxy.setUser(iNode, sName,
sNick, sTechEmail, sSSOID, sTechPwd, sConfPwd, sOldPwd, nodeStatus.Enabled, sDescr,
hasMobileAddon.True, sAuthCode);
Response.Write(setUserReturn + "<br />");
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
setUser_v2
Changes in Version 2 of setUser
The following have been introduced in the setUser_v2 method:
- rpataddon has been added as new input parameter.
- INVALIDPARAM_RPATADDON, INVALID_SECRETAUTHCODE, and USER_DELETED_OR_DISABLED have been added as new return values.
Input Parameters
Element | Description |
---|---|
node | The ID of the parent user. Required. |
name | The name of the user. Required. |
nick | The nick of the user. Optional. |
The email address of the user. Required. | |
ssoid | The Single Sign On ID of the user. Optional. |
pwd | The password of the user. Optional. |
confpwd | The confirmation password. Optional. |
oldpwd | The old password of the user. Optional. |
status | The status of the user. Required.
The possible values are as follows:
|
description | The description of the user. Optional. |
mobileaddon | Specifies whether the user has mobile addon. Required.
The possible values are as follows:
|
rpataddon | Specifies whether the user has RPAT addon. Required.
The possible values are as follows:
|
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 | Updating user properties succeeded. |
NOTLOGGEDIN | Updating user properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_MOBILEADDON | The mobile addon of the user is incorrectly specified. |
INVALIDPARAM_EMAIL | The email address of the use has an incorrect format. |
INVALIDPARAM_EMAIL_ALREADY_IN_USE | The specified email address is already in use. |
INVALIDPARAM_MISSING_CURRENT_PASSWORD | The current password is not defined. This error only occurs if a Master administrator updates his own user properties. |
INVALIDPARAM_PASSWORD_CANNOT_CONTAIN_ WHITESPACE_CHARACTERS | One of the password fields contain an extra space. |
INVALIDPARAM_PASSWORD_HAS_TO_BE_AT_LEAST_ 8_CHARACTERS_LONG | The new password must be at least 8 characters in length. |
INVALIDPARAM_PASSWORD_HAS_TO_CONTAIN_AT_LEAST_ TWO_UPPERCASE_LETTERS_OR_SPECIAL_CHARACTERS | The new password must contain at least 2 characters that are either uppercase or special characters. |
INVALIDPARAM_PASSWORD_LENGTH_HAS_TO_BE_BIGGER_ THAN_ZERO | The password fields cannot be empty. |
INVALIDPARAM_PASSWORD_DOES_NOT_MEET_THE_MINIMUM_ PASSWORD_STRENGHT_REQUIREMENTS | The Password Strength meter must meet the pre-defined minimum requirements. |
INVALIDPARAM_NEW_PASSWORDS_DO_NOT_MATCH | The new and the confirmation passwords do not match. |
INVALIDPARAM_CURRENT_AND_NEW_PASSWORD_MATCH | The current and the new passwords cannot match. |
INVALIDPARAM_CURRENT_PASSWORD_IS_WRONG | The current password of the user is incorrect. |
INVALIDPARAM_MISSING_CONFIRMATION_PASSWORD | The confirmation password field cannot be empty. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard, mobile, or RPAT licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_PARENT_NODE_ IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
INVALIDPARAM_RPATADDON | The RPAT addon of the user is incorrectly specified. |
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 setUser_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setUser_v2.aspx?node=337366&name=John Doe&nick=JDoe
&email=jdoe@company.com&ssoid=123456&pwd=secretPassword&confpwd=secretPassword
&oldpwd=oldPassword&status=enabled&description=Admin&addons=true&rpataddon=false
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setUser_v2.aspx">
<input name="node" value="337366">
<input name="name" value="John Doe">
<input name="nick" value="JDoe">
<input name="email" value="jdoe@company.com">
<input name="ssoid" value="123456">
<input name="pwd" value="secretPassword">
<input name="confpwd" value="secretPassword">
<input name="oldpwd" value="oldPassword">
<input name="status" value="enabled">
<input name="description" value="Admin">
<input name="addons" value="true">
<input name="rpataddon" value="false">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = [Node ID of user being modified];
string sName = "Name of user";
string sNick = "Nick name of user";
string sTechEmail = "Email address of user";
string sSSOID = "Single Sign On ID of user";
string sTechPwd = "New password";
string sConfPwd = "Password confirmation";
string sOldPwd = "Old password";
string sDescr = "Description of user";
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.setUserRet_v2 setUserReturn = proxy.setUser_v2(iNode, sName,
sNick, sTechEmail, sSSOID, sTechPwd, sConfPwd,
sOldPwd, nodeStatus.Enabled, sDescr,
hasMobileAddon.True, true, sAuthCode);
Response.Write(setUserReturn + "<br />");
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
setUserStatus_v7_1
Input Parameters
Element | Description |
---|---|
node | The ID of the Rescue user whose status you want to change. Required. |
status | The desired status of the Rescue user. Required.
The possible values are as follows:
|
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. |
OK | The status of the Rescue user was successfully changed. |
NOTLOGGEDIN | Changing the Rescue user's status failed because the current user is no longer logged in. |
INVALIDPARAM_STATUS | The specified status does not exist. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing Rescue user. |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user who is trying to change the status of another Rescue user is deleted or disabled. |
Sample Code
The following are examples for using the setUserStatus_v7_1 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setUserStatus_v7_1.aspx?node=337366&status=disabled
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setUserStatus_v7_1.aspx">
<input name="node" value="337366">
<input name="status" value="disabled">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=setUserStatus_v7_1.
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'
);
$iNodeID = 123456;
$eStatus = Enabled;
$sAuthCode = "4ahx...80u0";
$setuserparams = array (
'iNodeID' => $iNodeID,
'eStatus' => $eStatus,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$setUserResult = $soapclient->setUserStatus_v7_1($setuserparams);
print_r($setUserResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace setUser
{
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";
string sNode = "ID of node being updated";
string sStatus = "Status of node (Enabled | Disabled)";
string sAuthCode = "";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream()).ReadToEnd();
Response.Write(sRespLogin + "<br />");
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebRequest oReqSetUser = (HttpWebRequest)WebRequest.Create(sEndpoint +
"setuserstatus_v7_1.aspx" + "?node=" + sNode + "&status=" + sStatus + "&authcode=" + sAuthCode);
oReqSetUser.CookieContainer = sessioncookie;
HttpWebResponse oRespSetUser = (HttpWebResponse)oReqSetUser.GetResponse();
string sRespSetUser = new StreamReader(oRespSetUser.GetResponseStream())
.ReadToEnd();
Response.Write(sRespSetUser + "<br />");
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using setUser.WebServiceClients;
namespace setUser
{
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 iNode = Node ID of user being modified;
string sAuthCode = "";
WebServiceClients.API proxy = new WebServiceClients.API();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.setUserRet setUserReturn = proxy.setUserStatus_v7_1(iNode,
nodeStatus.Enabled, sAuthCode);
Response.Write(setUserReturn + "<br />");
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
createGroup
Input Parameters
Element | Description |
---|---|
parent | The ID of the parent node, which can be either the Administrators or Technicians organizational group in the Administration Center. Required. |
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 [new group nodeid] | Creating a new Rescue user group with the displayed ID succeeded. |
NOTLOGGEDIN | Creating a new Rescue user group failed because the current user is no longer logged in. |
INVALIDPARAM_PARENT | The ID of the parent group is incorrect either because it does not exist or because it is an incorrect group type. For example, a Technician Group can only be created in another Technician Group, but not in an Administrator Group. |
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 createGroup method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/createGroup.aspx?parent=337364&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/createGroup.aspx">
<input name="parent" value="337364">
<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=createGroup.
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'
);
$creategroupparams = array (
'iParentID' => 337364,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$createGroupResult = $soapclient->createGroup($creategroupparams);
$newGroup = $createGroupResult['iNewNodeID'];
print_r($createGroupResult . " New group node: " . $newGroup);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createGroup.WebServiceClients;
namespace createGroup
{
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@mail.com";
string sPwd = "secretpassword";
int iParent = [ID of parent node];
int iNewNodeID;
string sAuthCode = "";
HttpWebRequest oLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oLogin.CookieContainer = new CookieContainer();
HttpWebResponse oLoginResp = (HttpWebResponse)oLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream())
.ReadToEnd();
Response.Write(sLoginResp + "<br />");
CookieContainer sessioncookie = oLogin.CookieContainer;
HttpWebRequest oCreateGroup = (HttpWebRequest)WebRequest.Create(sEndpoint +
"createGroup.aspx" + "?parent=" + iParent + "&authcode=" + sAuthCode);
oCreateGroup.CookieContainer = sessioncookie;
HttpWebResponse oCreateGroupResp = (HttpWebResponse)oCreateGroup.
GetResponse();
string sCreateGroupResp = new StreamReader
(oCreateGroupResp.GetResponseStream()).ReadToEnd();
Response.Write(sCreateGroupResp);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createGroup.WebServiceClients;
namespace createGroup
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iParent = [ID of the parent node];
int iNewNodeID;
string sAuthCode = "";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.createGroupRet cGroup = proxy.createGroup(iParent,
sAuthCode, out iNewNodeID);
Response.Write(cGroup + "<br />" + iNewNodeID);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getGroup
Input Parameters
Element | Description |
---|---|
node | The ID of the user group of which information you want to retrieve. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NODEID: 337364 NAME: TechGroup DESCRIPTION: TechGroup1 TYPE: TechnicianGroup PERMISSIONS:
RemoteControl, RemoteView, SendFile, SendURL, ViewSystemInformation, RebootClientComputer,
ReceiveFile, SessionRecording, PrivateSessions, FileManagement, UnlimitedScripting,
SessionTransferNotAllowed, WindowsCredentialsRequestNotAllowed,
ClipboardSynchronizationNotAllowed, CallingCardDeployment, ScreenSharingNotAllowed,
CollaborationNotAllowed, DeviceConfiguration, ChatSuppression, ChatSuppressionConsoleSwitch,
EditCustomField, LOCKEDPERMISSIONS: CallingCardDeployment, ISENABLED: True
STANDARDCONCURRENTLIMIT: 0 MOBILECONCURRENTLIMIT: 0
NODEID: The Rescue ID of the user groupNAME: Name of the user groupDESCRIPTION: Description of the user groupTYPE: Group type, which can be Technician Group, Administrator Group, Administrator Group Link, or Pseudo GroupPERMISSIONS: Group permissions as defined on the Organization tab of the Administration CenterLOCKEDPERMISSIONS: Group permissions that only a Master Administrator can changeISENABLED: Defines whether the group is enabled or notSTANDARDCONCURRENTLIMIT: The maximum number of concurrent technicians with standard licencesMOBILECONCURRENTLIMIT: The maximum number of concurrent technicians with mobile licences
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user group succeeded. |
NOTLOGGEDIN | Retrieving information about a user group failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user group. |
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 getGroup method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getGroup.aspx?node=337364&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getGroup.aspx">
<input name="node" value="337364">
<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=getGroup.
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'
);
$getgroupparams = array (
'iNodeID' => 337364,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$getGroupResult = $soapclient->getGroup($getgroupparams);
print_r($getGroupResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using getGroup.WebServiceClients;
namespace getGroup
{
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 iNode = 337364;
string sAuthCode = "4ahx...80u0";
HttpWebRequest oLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oLogin.CookieContainer = new CookieContainer();
HttpWebResponse oLoginResp = (HttpWebResponse)oLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream())
.ReadToEnd();
Response.Write(sLoginResp + "<br />");
CookieContainer sessioncookie = oLogin.CookieContainer;
HttpWebRequest oGetGroup = (HttpWebRequest)WebRequest.Create(sEndpoint +
"getGroup.aspx" + "?node=" + iNode + "&authcode=" + sAuthCode);
oGetGroup.CookieContainer = sessioncookie;
HttpWebResponse oGetGroupResp = (HttpWebResponse)oGetGroup.GetResponse();
string sGetGroupResp = new StreamReader(oGetGroupResp.GetResponseStream())
.ReadToEnd();
Response.Write(sGetGroupResp);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createGroup.WebServiceClients;
namespace createGroup
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@mail.com";
string sPwd = "secretpassword";
int iNode = [ID of node in which information is being retrieved];
string sAuthCode = "";
Group oGroup = new Group();
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.getGroupRet oGetGroup = proxy.getGroup(iNode, sAuthCode,
out oGroup);
Response.Write(oGetGroup.ToString());
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getGroup_v2
Changes in Version 2 of getGroup
The following has been introduced in the getGroup_v2 method:
- UnattendedAccess and SessionHoldNotAllowed have been added as new node permissions.
- The RPATCONCURRENTLIMIT option is now available for displaying the limit of concurrent RPAT-enabled technicians.
Input Parameters
Element | Description |
---|---|
node | The ID of the user group of which information you want to retrieve. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NODEID: 337364 NAME: TechGroup DESCRIPTION: TechGroup1 TYPE: TechnicianGroup PERMISSIONS:
RemoteControl, RemoteView, SendFile, SendURL, ViewSystemInformation, RebootClientComputer,
ReceiveFile, SessionRecording, PrivateSessions, FileManagement, UnlimitedScripting,
SessionTransferNotAllowed, WindowsCredentialsRequestNotAllowed,
ClipboardSynchronizationNotAllowed, CallingCardDeployment, ScreenSharingNotAllowed,
CollaborationNotAllowed, DeviceConfiguration, ChatSuppression, ChatSuppressionConsoleSwitch,
EditCustomField, UnattendedAccess, SessionHoldNotAllowed, LOCKEDPERMISSIONS:
CallingCardDeployment, ISENABLED: True STANDARDCONCURRENTLIMIT: 0 MOBILECONCURRENTLIMIT: 0
RPATCONCURRENTLIMIT: 0
NODEID: The Rescue ID of the user groupNAME: Name of the user groupDESCRIPTION: Description of the user groupTYPE: Group type, which can be Technician Group, Administrator Group, Administrator Group Link, or Pseudo GroupPERMISSIONS: Group permissions as defined on the Organization tab of the Administration CenterLOCKEDPERMISSIONS: Group permissions that only a Master Administrator can changeISENABLED: Defines whether the group is enabled or notSTANDARDCONCURRENTLIMIT: The maximum number of concurrent technicians with standard licencesMOBILECONCURRENTLIMIT: The maximum number of concurrent technicians with mobile licencesRPATCONCURRENTLIMIT: The maximum number of concurrent RPAT-enabled technicians
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user group succeeded. |
NOTLOGGEDIN | Retrieving information about a user group failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user group. |
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 getGroup_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getGroup_v2.aspx?node=337364&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getGroup_v2.aspx">
<input name="node" value="337364">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@mail.com";
string sPwd = "secretpassword";
int iNode = [ID of node in which information is being retrieved];
string sAuthCode = "4ahx...80u0";
Group_V2 oGroupV2 = new Group_V2();
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.getGroupRet oGetGroupV2 = proxy.getGroup_v2(iNode, sAuthCode, out oGroupV2);
Response.Write(oGetGroupV2.ToString());
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
getGroup_v3
Changes in Version 3 of getGroup
The following has been introduced in the getGroup_v3 method:
- Instead RemoteControl permission RemoteControlDesktop and RemoteControlMobile have been added as new node permissions.
Input Parameters
Element | Description |
---|---|
node | The ID of the user group of which information you want to retrieve. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK
NODEID: 4626880
NAME: TechGroup
DESCRIPTION: Description of TechnicianGroup
TYPE: TechnicianGroup
PERMISSIONS: RemoteView, SendFile, SendURL, ViewSystemInformation, RebootClientComputer,
ReceiveFile, SessionRecording, PrivateSessions, OneTimePermission, FileManagement, ScriptRunning,
UnlimitedScripting, ChatSuppressionConsoleSwitch, SessionTransferNotAllowed, WindowsCredentialsRequestNotAllowed,
ClipboardSynchronizationNotAllowed, CallingCardDeployment, ScreenSharingNotAllowed,
CollaborationNotAllowed, DeviceConfiguration, ChatSuppression,
EditCustomField, UnattendedAccess, SessionHoldNotAllowed, InviteExternalTechnicians, RemoteControlDesktop,
RemoteControlMobile
LOCKEDPERMISSIONS: SendFile
ISENABLED: True
STANDARDCONCURRENTLIMIT: 0
MOBILECONCURRENTLIMIT: 0
RPATCONCURRENTLIMIT: 0
NODEID: The Rescue ID of the user groupNAME: Name of the user groupDESCRIPTION: Description of the user groupTYPE: Group type, which can be Technician Group, Administrator Group, Administrator Group Link, or Pseudo GroupPERMISSIONS: Group permissions as defined on the Organization tab of the Administration CenterLOCKEDPERMISSIONS: Group permissions that only a Master Administrator can changeISENABLED: Defines whether the group is enabled or notSTANDARDCONCURRENTLIMIT: The maximum number of concurrent technicians with standard licencesMOBILECONCURRENTLIMIT: The maximum number of concurrent technicians with mobile licencesRPATCONCURRENTLIMIT: The maximum number of concurrent RPAT-enabled technicians
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving information about a user group succeeded. |
NOTLOGGEDIN | Retrieving information about a user group failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing user group. |
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 getGroup_v3 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getGroup_v2.aspx?node=337364&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getGroup_v2.aspx">
<input name="node" value="337364">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@mail.com";
string sPwd = "secretpassword";
int iNode = [ID of node in which information is being retrieved];
string sAuthCode = "4ahx...80u0";
Group_V3 oGroupV3 = new Group_V3();
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.getGroupRet oGetGroupV3 = proxy.getGroup_v3(iNode, sAuthCode, out oGroupV3);
Response.Write(oGetGroupV3.ToString());
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
setGroup
Input Parameters
Element | Description |
---|---|
node | The ID of the user group. Required. |
name | The name of the user group. Required. |
status | The status of the user group. Required.
The possible values are the following:
|
description | The description of the user group. Optional. |
permission | The possible permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
lockedpermission | The locked permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
standardconcurrentlimit | The limit of the standard concurrent seats. Required. |
mobileconcurrentlimit | The limit of the mobile concurrent seats. Required. |
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 | Updating user group properties succeeded. |
NOTLOGGEDIN | Updating user group properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_PERMISSION | The defined permissions of the user are either incorrect or empty. |
INVALIDPARAM_LOCKEDPERMISSION | The defined locked permission set of the user are either incorrect or empty. |
INVALIDPARAM_STANDARDCONCURRENTLIMIT | The number of standard concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
INVALIDPARAM_MOBILECONCURRENTLIMIT | The number of mobile concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard or mobile licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_ PARENT_NODE_IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
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 setGroup method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setGroup.aspx?node=337364&name=TechGroup&status=Enabled
&description=TechGroup1&permission=RemoteControl, RemoteView&lockedpermission=
CallingCardDeployment&standardconcurrentlimit=10&mobileconcurrentlimit=10
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setGroup.aspx">
<input name="node" value="337364">
<input name="name" value="TechGroup">
<input name="status" value="Enabled">
<input name="description" value="TechGroup1">
<input name="permission" value="RemoteControl, RemoteView">
<input name="lockedpermission" value="CallingCardDeployment">
<input name="standardconcurrentlimit" value="10">
<input name="mobileconcurrentlimit" value="10">
<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=setGroup.
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'
);
$iNodeID = 337364;
$sName = "TechGroup";
$eStatus = Enabled;
$sDescription = "TechGroup1";
$aPermission = array(
0 => "RemoteControl",
1 => "RemoteView"
);
$aLockedPermission = array(
0 => "RemoteControl",
1 => "RemoteView"
);
$iStandardConcurrentLimit = 10;
$iMobileConcurrentLimit = 10;
$sAuthCode = "4ahx...80u0";
$setgroupparams = array (
'iNodeID' => $iNodeID,
'sName' => $sName,
'eStatus' => $eStatus,
'sDescription' => $sDescription,
'aPermission' => $aPermission,
'aLockedPermission' => $aLockedPermission,
'iStandardConcurrentLimit' => $iStandardConcurrentLimit,
'iMobileConcurrentLimit' => $iMobileConcurrentLimit,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$setGroupResult = $soapclient->setGroup($setgroupparams);
print_r($setGroupResult);
?>
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 iNodeID = 337364;
string sName = "TechGroup";
string eNodeStatus = "Enabled";
string sDescription = "TechGroup1";
string aPermission = "RemoteControl, RemoteView";
string aLockedPermission = "RemoteControl, RemoteView" ;
int iStandardConcurrentLimit = 10;
int iMobileConcurrentLimit = 10;
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 oSetGroup = (HttpWebRequest)WebRequest.Create(sEndpoint +
"setGroup.aspx?node=" + iNodeID + "&name=" + sName + "&status=" + eNodeStatus
+ "&description=" + sDescription + "&permission=" + aPermission + "&lockedpermission="
+ aLockedPermission + "&standardconcurrentlimit=" + iStandardConcurrentLimit
+ "&mobileconcurrentlimit=" + iMobileConcurrentLimit + "&authcode=" + sAuthCode);
oSetGroup.CookieContainer = sessioncookie;
HttpWebResponse oRespSetGroup = (HttpWebResponse)oSetGroup.GetResponse();
string sRespSetGroup = new StreamReader(oRespSetGroup.GetResponseStream())
.ReadToEnd();
Response.Write(sRespSetGroup);
}
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 iNodeID = 123456;
string sName = "Testing";
nodeStatus eNodeStatus = nodeStatus.Enabled;
string sDescription = "";
NODE_PERMISSIONS[] aPermissions = { NODE_PERMISSIONS.RemoteControl,
NODE_PERMISSIONS.RemoteView };
NODE_PERMISSIONS[] aLockedPermissions = { NODE_PERMISSIONS.RemoteControl,
NODE_PERMISSIONS.RemoteView };
int iStandardConcurrentLimit = 0;
int iMobileConcurrentLimit = 0;
string sAuthCode = "";
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.setGroupRet oSetGroup = proxy.setGroup(iNodeID, sName,
eNodeStatus, sDescription, aPermissions, aLockedPermissions, iStandardConcurrentLimit,
iMobileConcurrentLimit, sAuthCode);
Response.Write(oSetGroup + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
setGroup_v2
Changes in Version 2 of setGroup
The following have been introduced in the setGroup_v2 method:
- UnattendedAccess, SessionHoldNotAllowed, and ConnectOnLan have been added as new permissions and locked permissions for nodes.
- The RPATCONCURRENTLIMIT parameter is now available for displaying the limit of concurrent RPAT-enabled technicians.
Input Parameters
Element | Description |
---|---|
node | The ID of the user group. Required. |
name | The name of the user group. Required. |
status | The status of the user group. Required.
The possible values are as follows:
|
description | The description of the user group. Optional. |
permission | The possible permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
lockedpermission | The locked permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
standardconcurrentlimit | The limit of the standard concurrent seats. Required. |
mobileconcurrentlimit | The limit of the mobile concurrent seats. Required. |
rpatconcurrentlimit | The limit of the RPAT concurrent seats. This element is only available in the setGroup_v2 method. Required. |
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 | Updating user group properties succeeded. |
NOTLOGGEDIN | Updating user group properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_PERMISSION | The defined permission set of the user are either incorrect or empty. |
INVALIDPARAM_LOCKEDPERMISSION | The defined locked permission set of the user are either incorrect or empty. |
INVALIDPARAM_STANDARDCONCURRENTLIMIT | The number of standard concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
INVALIDPARAM_MOBILECONCURRENTLIMIT | The number of mobile concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
INVALIDPARAM_RPATCONCURRENTLIMIT | The number of RPAT concurrent users cannot exceed the limit defined for either globally for the organization or for the group. This error is only available for users of the setGroup_v2 method. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard, mobile, or RPAT licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_ PARENT_NODE_IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
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 setGroup_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setGroup_v2.aspx?node=337364&name=TechGroup&status=Enabled
&description=TechGroup1&permission=RemoteControl, RemoteView&lockedpermission=
CallingCardDeployment&standardconcurrentlimit=10&mobileconcurrentlimit=10
&rpatconcurrentlimit=5&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setGroup_v2.aspx">
<input name="node" value="337364">
<input name="name" value="TechGroup">
<input name="status" value="Enabled">
<input name="description" value="TechGroup1">
<input name="permission" value="RemoteControl, RemoteView">
<input name="lockedpermission" value="CallingCardDeployment">
<input name="standardconcurrentlimit" value="10">
<input name="mobileconcurrentlimit" value="10">
<input name="rpatconcurrentlimit" value="5">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
using System;
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretpassword";
int iNodeID = 123456;
string sName = "Testing";
nodeStatus eNodeStatus = nodeStatus.Enabled;
string sDescription = "";
NODE_PERMISSIONS_V2[] aPermissions = { NODE_PERMISSIONS_V2.RemoteControl, NODE_PERMISSIONS_V2.RemoteView };
NODE_PERMISSIONS_V2[] aLockedPermissions = { NODE_PERMISSIONS_V2.RemoteControl, NODE_PERMISSIONS_V2.RemoteView };
int iStandardConcurrentLimit = 0;
int iMobileConcurrentLimit = 0;
int iRPATConcurrentLimit = 0;
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.setGroupRet_v2 oSetGroupV2 = proxy.setGroup_v2(iNodeID, sName,
eNodeStatus, sDescription, aPermissions,
aLockedPermissions, iStandardConcurrentLimit,
iMobileConcurrentLimit, iRPATConcurrentLimit, sAuthCode);
Response.Write(oSetGroupV2 + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
setGroup_v3
Changes in Version 3 of setGroup
The following have been introduced in the setGroup_v3 method:
- Instead RemoteControl permission RemoteControlDesktop and RemoteControlMobile have been added as new node permissions.
Input Parameters
Element | Description |
---|---|
node | The ID of the user group. Required. |
name | The name of the user group. Required. |
status | The status of the user group. Required.
The possible values are as follows:
|
description | The description of the user group. Optional. |
permission | The possible permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
lockedpermission | The locked permissions of a group. Use commas (,) to define multiple permissions. Optional.
The possible values are as follows:
|
standardconcurrentlimit | The limit of the standard concurrent seats. Required. |
mobileconcurrentlimit | The limit of the mobile concurrent seats. Required. |
rpatconcurrentlimit | The limit of the RPAT concurrent seats. This element is only available in the setGroup_v2 method. Required. |
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 | Updating user group properties succeeded. |
NOTLOGGEDIN | Updating user group properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_PERMISSION | The defined permission set of the user are either incorrect or empty. |
INVALIDPARAM_LOCKEDPERMISSION | The defined locked permission set of the user are either incorrect or empty. |
INVALIDPARAM_STANDARDCONCURRENTLIMIT | The number of standard concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
INVALIDPARAM_MOBILECONCURRENTLIMIT | The number of mobile concurrent users cannot exceed the limit defined for either globally for the organization or for the group. |
INVALIDPARAM_RPATCONCURRENTLIMIT | The number of RPAT concurrent users cannot exceed the limit defined for either globally for the organization or for the group. This error is only available for users of the setGroup_v2 method. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard, mobile, or RPAT licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_ PARENT_NODE_IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
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 setGroup_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setGroup_v2.aspx?node=337364&name=TechGroup&status=Enabled
&description=TechGroup1&permission=RemoteControl, RemoteView&lockedpermission=
CallingCardDeployment&standardconcurrentlimit=10&mobileconcurrentlimit=10
&rpatconcurrentlimit=5&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setGroup_v2.aspx">
<input name="node" value="337364">
<input name="name" value="TechGroup">
<input name="status" value="Enabled">
<input name="description" value="TechGroup1">
<input name="permission" value="RemoteControlDesktop, RemoteView">
<input name="lockedpermission" value="CallingCardDeployment">
<input name="standardconcurrentlimit" value="10">
<input name="mobileconcurrentlimit" value="10">
<input name="rpatconcurrentlimit" value="5">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
using System;
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretpassword";
int iNodeID = 123456;
string sName = "Testing";
nodeStatus eNodeStatus = nodeStatus.Enabled;
string sDescription = "";
NODE_PERMISSIONS_V4[] aPermissions = { NODE_PERMISSIONS_V4.RemoteControlDesktop, NODE_PERMISSIONS_V4.RemoteView };
NODE_PERMISSIONS_V4[] aLockedPermissions = { NODE_PERMISSIONS_V4.RemoteControlDesktop, NODE_PERMISSIONS_V4.RemoteView };
int iStandardConcurrentLimit = 0;
int iMobileConcurrentLimit = 0;
int iRPATConcurrentLimit = 0;
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.setGroupRet_v3 oSetGroupV3 = proxy.setGroup_v3(iNodeID, sName,
eNodeStatus, sDescription, aPermissions,
aLockedPermissions, iStandardConcurrentLimit,
iMobileConcurrentLimit, iRPATConcurrentLimit, sAuthCode);
Response.Write(oSetGroupV3 + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
moveNode
Input Parameters
Element | Description |
---|---|
targetNode | The ID of the node that will be the new parent node. Required. |
node | The ID of the node that you want to move. Required. |
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 | Moving a node succeeded. |
NOTLOGGEDIN | Moving a node failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing source node. |
INVALIDPARAM_TARGETNODE | The specified ID is not the ID of an existing target node. |
INVALID_MOVE | The node cannot be moved to the target node because the target node does not exist or the specified node that you want to move cannot be the child of the target node. For example, a technician cannot be moved to an Administrator Group. |
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 moveNode method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/moveNode.aspx?targetnode=337364&node=337366
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/moveNode.aspx">
<input name="targetNodeID" value="337364">
<input name="nodeID" value="337366">
<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=moveNode.
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'
);
$iTargetNodeID = 337364;
$iNodeID = 337366;
$sAuthCode = "4ahx...80u0";
$movenodeparams = array (
'iTargetNodeID' => $iTargetNodeID,
'iNodeID' => $iNodeID,
'sAuthCode' => ''
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$moveNodeResult = $soapclient->moveNode($movenodeparams);
print_r($moveNodeResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createGroup.WebServiceClients;
namespace createGroup
{
public partial class WebForm1 : 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 iTargetNode = 337364;
int iNode = 337366;
string sAuthCode = "4ahx...80u0"l
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream())
.ReadToEnd();
Response.Write(sRespLogin + "<br />");
HttpWebRequest oReqMoveNode = (HttpWebRequest)WebRequest.Create(sEndpoint +
"movenode.aspx" + "?targetnode=" + iTargetNode + "&node=" + iNode + "&authcode="
+ sAuthCode);
oReqMoveNode.CookieContainer = sessioncookie;
HttpWebResponse oRespMoveNode = (HttpWebResponse)oReqMoveNode.GetResponse();
string sRespMoveNode = new StreamReader(oRespMoveNode.GetResponseStream())
.ReadToEnd();
Response.Write(sRespMoveNode);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using createGroup.WebServiceClients;
namespace createGroup
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iTargetNode = 337364;
int iNode = 337366;
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.moveNodeRet oMoveNode = proxy.moveNode(iTargetNode, iNode,
sAuthCode);
Response.Write(oMoveNode);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
deleteNode
Input Parameters
Element | Description |
---|---|
node | The ID of the node to delete. Required. |
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 | Deleting a node succeeded. |
NOTLOGGEDIN | Deleting a node failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing node. |
INVALID_DELETE | The node cannot be deleted because the user who is currently logged in has insufficient privileges. An administrator cannot delete himself either. |
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 deleteNode method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/deleteNode.aspx?node=337366&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/deleteNode.aspx">
<input name="nodeID" value="337366">
<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=deleteNode.
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'
);
$deletenodeparams = array (
'iNodeID' => 337366,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$deleteNodeResult = $soapclient->deleteNode($deletenodeparams);
print_r($deleteNodeResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using deleteNode.WebServiceClients;
namespace deleteNode
{
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 iNode = 337366;
string sAuthCode = "4ahx...80u0"
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebResponse oLoginResp = (HttpWebResponse)oReqLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream())
.ReadToEnd();
Response.Write(sLoginResp + "<br />");
HttpWebRequest oReqDeleteNode = (HttpWebRequest)WebRequest.Create
(sEndpoint + "deleteNode.aspx" + "?node=" + iNode + "&authcode=" + sAuthCode);
HttpWebResponse oDeleteNodeResp = (HttpWebResponse)
oReqDeleteNode.GetResponse();
string sDeleteNodeResp = new StreamReader
(oDeleteNodeResp.GetResponseStream()).ReadToEnd();
Response.Write(sDeleteNodeResp);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using deleteNode.WebServiceClients;
namespace deleteNode
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = 337366;
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.deleteNodeRet oDeleteNode = proxy.deleteNode(iNode, sAuthCode);
Response.Write(oDeleteNode);
}
}
}
assignChannel
Input Parameters
Element | Description |
---|---|
node | The ID of the technician or Technician Group. Required. |
entry | The ID of the channel that you want to assign. Required. |
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 | Assigning a channel succeeded. |
NOTLOGGEDIN | Assigning a channel failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The ID of a technician or a Technician Group is not defined. |
INVALIDPARAM_ENTRY | The ID of a channel is not defined. |
INVALID_ASSIGN | The channel cannot be assigned to the selected node because it is not an existing technician or Technician Group. |
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 assignChannel method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/assignChannel.aspx?node=337364
&entry=1902861082&authcode=...
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/assignChannel.aspx">
<input name="node" value="337364">
<input name="entry" value="1902861082">
<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=assignChannel.
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'
);
$assignchannelparams = array (
'iEntryID' => 1902861082,
'iNodeID' => 337364,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$assignChannelResult = $soapclient->assignChannel($assignchannelparams);
print_r($assignChannelResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
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 iNode = 337364;
int iEntry = 1902861082;
//sAuthCode is the return value of the requestAuthCode API call
string sAuthCode = "4ahx...80u0";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebResponse oLoginResp = (HttpWebResponse)oReqLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream()).ReadToEnd();
Response.Write(sLoginResp + "<br />");
HttpWebRequest oAssign = (HttpWebRequest)WebRequest.Create(sEndpoint +
"assignChannel.aspx" + "?node=" + iNode + "&entry=" + iEntry + "&authcode=" + sAuthCode);
oAssign.CookieContainer = sessioncookie;
HttpWebResponse oAssignResp = (HttpWebResponse)oAssign.GetResponse();
string sAssignResp = new StreamReader(oAssignResp.GetResponseStream())
.ReadToEnd();
Response.Write(sAssignResp);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@email.com";
string sPwd = "secretpassword";
int iNode = 337364;
int iEntry = 1902861082;
//sAuthCode is the return value of the requestAuthCode API call
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.assignChannelRet oAssign = proxy.assignChannel(iEntry,
iNode, sAuthCode);
Response.Write(oAssign);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
unassignChannel
Input Parameters
Element | Description |
---|---|
node | The ID of the technician or Technician Group. Required. |
entry | The ID of the channel. Required. |
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 | Unassigning a technician or Technician Group succeeded. |
NOTLOGGEDIN | Unassigning a technician or Technician Group failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The ID of a technician or a Technician Group is not defined. |
INVALIDPARAM_ENTRY | The ID of a channel is not defined. |
INVALID_DEASSIGN | The channel cannot be unassigned from a technician or Technician Group. |
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 unassignChannel method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/unassignChannel.aspx?node=337364
&entry=1902861082&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/unassignChannel.aspx">
<input name="node" value="337364">
<input name="entry" value="1902861082">
<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=unassignChannel.
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'
);
$iNodeID = 337364;
$iEntryID = 1902861082;
$sAuthCode = "4ahx...80u0";
$unassignchannelparams = array (
'iNodeID' => $iNodeID,
'iEntryID' => $iEntryID,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$unassignChannelResult = $soapclient->unassignChannel($unassignchannelparams);
print_r($unassignChannelResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
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 iNode = 337364;
int iEntry = 1902861082;
string sAuthCode = "4ahx...80u0";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebResponse oLoginResp = (HttpWebResponse)oReqLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream())
.ReadToEnd();
Response.Write(sLoginResp + "<br />");
HttpWebRequest oUnassign = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "unassignChannel.aspx" + "?node=" + iNode + "&entry=" + iEntry + "&authcode="
+ sAuthCode);
oUnassign.CookieContainer = sessioncookie;
HttpWebResponse oUnnasignResp = (HttpWebResponse)oUnassign.GetResponse();
string sUnnasignResp = new StreamReader(oUnnasignResp.GetResponseStream())
.ReadToEnd();
Response.Write(sUnnasignResp);
}
catch (Exception ex)
{
lblError.Text = 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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = 337364;
int iEntry = 1902861082;
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.unassignChannelRet oUnassign = proxy.unassignChannel
(iEntry, iNode, sAuthCode);
Response.Write(oUnassign);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
Supporting CRM Systems
generateEmailText
Input Parameters
Element | Description |
---|---|
pincode | The PIN code of the technician session, which must be 6-digit long. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK SUBJECT:Connection email link TEXT:Please click the link below to request a live support
session: LINK:http://yourorganization.com/R?i=2&Code=123456 SIGNATURE:Best Regards, Support Team
SUBJECT: Email subjectTEXT: Email bodyLINK: Link to the support PIN codeSIGNATURE: Email signature
Return Values
Displayed Return Value | Description |
---|---|
ERROR |
|
OK | An email was successfully generated. |
NOTLOGGEDIN | An email was not generated because the current user is no longer logged in. |
NOTTECHNICIAN | The API user is not a technician, so he cannot initiate a private session. |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user is deleted or disabled. |
INVALIDPINFORMAT | The format of the PIN code in the email is incorrect. |
Sample Code
The following are examples for using the generateEmailText method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/generateEmailText.aspx?pincode=123456
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/generateEmailText.aspx">
<input name="pincode" value="123456">
<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=generateEmailText.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//set customer info
//you would normally do this via a form or dynamically from your CRM
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
$bNoTech = true; //specifies whether Technician Console must be running
//create params array for SOAP request
$requestPINCodeParams = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0,
'bNoTechConsole' => $bNoTech
);
$requestPINCodeResult = $soapclient->requestPINCode($requestPINCodeParams);
//print out the PIN Code full response
print_r("<b>requestPINCode full response.</b><br />");
print_r($requestPINCodeResult);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestPINCodeResult["iPINCode"];
$sAuthCode = "";
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
echo "<br /><br />"; //formatting
//generate email text
//create array for email text request
$pin = array(
'iPINCode' => $PINCode,
'sAuthCode' => $sAuthCode
);
$emailtext = $soapclient->generateEmailText($pin);
//show the full email text response
print_r("<b>generateEmailText full response.</b><br />");
print_r($emailtext);
//email text formatted
print_r("<b>Formatted email text.</b><br />");
print_r($emailtext["sSubject"] . "<br /><br />");
print_r($emailtext["sText"] . "<br /><br />");
print_r($emailtext["sLink"] . "<br /><br />");
print_r($emailtext["sSignature"]);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx?
for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the EmailText info
HttpWebRequest oReqEmailText = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "generateEmailText.aspx?pincode=" + iPIN + "&authcode=" + sAuthCode);
oReqEmailText.CookieContainer = sessioncookie;
HttpWebResponse oRespEmailText = (HttpWebResponse)oReqEmailText.GetResponse();
string sRespEmailText = new StreamReader(oRespEmailText.GetResponseStream()).ReadToEnd();
Response.Write("requestEmailText result: " + sRespEmailText + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API generateEmailText Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "4ahx...80u0";
int iPIN;
string sSubject;
string sText;
string sLink;
string sSignature;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestPINCodeRet oRequestPIN =
proxy.requestPINCode("", "", "", "", "", "", "", true, sAuthCode, out iPIN);
Response.Write(oRequestPIN + "<br />");
WebServiceClients.generateEmailTextRet oEmailText = proxy.generateEmailText
(iPIN, sAuthCode, out sSubject, out sText, out sLink, out sSignature);
Response.Write(oEmailText + "<br />");
Response.Write("Subject: " + sSubject + "<br />Body: " + sText +
"<br />Link: " + sLink + "<br />Signature: " + sSignature);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
getLoginTicket
Input Parameters
Element | Description |
---|---|
ssoid | The single sign-on ID of the Rescue account. Required. |
Password | The password of the corresponding Rescue account. Required. |
CompanyID | The identifier of the company using single sign-on to authenticate technicians. Required. |
Output
OK:https://secure.logmeinrescue.com/SSO/Login.aspx?Ticket=f70..156
Return Values
Displayed Return Value | Description |
---|---|
OK | Generating a login ticket succeeded. |
INVALIDPASSWORD | The single sign-on ID does not identify a technician, and/or the specified password does not authenticate a technician. |
INVALIDCOMPANYID | The specified company ID does not exist. |
MISSINGPARAMETERS | At least one of the required parameters was not provided. |
Sample Code
The following are examples for using the getLoginTicket method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/SSO/GetLoginTicket.aspx?ssoid=123456&Password=secretPassword
&CompanyID=654321
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/SSO/GetLoginTicket.aspx">
<input name="ssoid value="123456">
<input name="Password" value="secretPassword">
<input name="CompanyID" value="654321">
</form>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
string sSSOID = [your User ID];
string sSSOPassword = [Should be set manually];
System.Net.HttpWebRequest oReq =
(System.Net.HttpWebRequest)System.Net.WebRequest.Create
("https://secure.logmeinrescue.com/SSO/GetLoginTicket.aspx?SSOID=" + sSSOID + "&Password="
+ sSSOPassword + "&CompanyID=112938");
System.Net.HttpWebResponse oResp = (System.Net.HttpWebResponse)oReq.GetResponse();
string sResp = new System.IO.StreamReader(oResp.GetResponseStream()).ReadToEnd();
if (sResp.StartsWith("OK:"))
Response.Redirect( sResp.Substring("OK:".Length) );
else
Response.Write( sResp );
getDTCLoginTicket
Input Parameters
Element | Description |
---|---|
ssoid | The single sign-on ID of the Rescue account. Required. |
Password | The password of the corresponding Rescue account. Required. |
CompanyID | The identifier of the company using single sign-on to authenticate technicians. Required. |
arch=64 | To be used when 64-bit Desktop Technician Console is needed. Optional. |
Output
https://secure.logmeinrescue.com/TechConsole/DesktopApp/DownloadSSO.aspx?companyid=654321&ticket=4c6f1815-1e0c-43ab-8117-d79b8f523824&arch=64
Return Values
Displayed Return Value | Description |
---|---|
OK | Generating a login ticket succeeded. |
INVALIDPASSWORD | The single sign-on ID does not identify a technician, and/or the specified password does not authenticate a technician. |
INVALIDCOMPANYID | The specified company ID does not exist. |
MISSINGPARAMETERS | At least one of the required parameters was not provided. |
Sample Code
The following are examples for using the getDTCLoginTicket method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/SSO/GetDTCLoginTicket.aspx?ssoid=123456&Password=secretPassword&CompanyID=654321&arch=64
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/SSO/GetDTCLoginTicket.aspx">
<input name="ssoid value="123456">
<input name="Password" value="secretPassword">
<input name="CompanyID" value="654321">
<input name="arch" value="64">
</form>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
string sSSOID = [your User ID];
string sSSOPassword = [Should be set manually];
bool is64Bit = true;
System.Net.HttpWebRequest oReq =
(System.Net.HttpWebRequest)System.Net.WebRequest.Create
("https://secure.logmeinrescue.com/SSO/GetDTCLoginTicket.aspx?SSOID=" + sSSOID + "&Password="
+ sSSOPassword + "&CompanyID=112938" + (is64Bit? "&arch=64" : ""));
System.Net.HttpWebResponse oResp = (System.Net.HttpWebResponse)oReq.GetResponse();
string sResp = new System.IO.StreamReader(oResp.GetResponseStream()).ReadToEnd();
if (sResp.StartsWith("OK:"))
Response.Redirect( sResp.Substring("OK:".Length) );
else
Response.Write( sResp );
getPINCode
Input Parameters
The getPINCode method generates a PIN code using the CompanyID and SSOID parameters.
Cannot find your CompanyID or SSOID? See Setting up Single Sign-On Authentication in the Rescue Administration Center User Guide.
Element | Description |
---|---|
CompanyID | A unique for your Rescue organization |
SSOID | The Single Sign-on ID of the technician |
Optional Parameters
Element | Description |
---|---|
name | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
trackingid | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
islenspincode | Specifies the session type. Optional.
|
Output
Returns a 6-digit PIN code in HTML format.
Error Codes
Displayed Return Value | Description |
---|---|
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOPERMISSIONFORLENS | Requesting a PIN code failed because the current user does not have permission to access Rescue Lens. |
NOTECHCONSOLERUNNING | Requesting a PIN code failed because the Technician Console is not running. |
MISSINGPARAMETER | Requesting a PIN code failed because a required parameter (SSOID or CompanyID) is not provided. |
ERROR | Requesting a PIN code failed because an unspecified error occurred, such as timeout. |
Sample Code
The following examples show how to call the getPINCode method in your environment.
HTTP GET
https://secure.logmeinrescue.com/Integration/HewlettPackard/GetPinCode?
CompanyID=123456&SSOID=TechnicianSSOID?name=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&trackingid=track0¬echconsole=0&islenspincode=0
requestAuthCode
Input Parameters
Element | Description |
---|---|
The email address of the Rescue account. Required. | |
pwd | The password of the corresponding Rescue account. Required. |
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 email do not identify and authenticate a technician. |
requestAuthCode_PollRateExceeded | There is this response when there is more than 1 requestAuthCode API call within a second. The current limit is one requestAuthCode API call per second. |
Sample Code
The following are examples for using the requestAuthCode method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/requestAuthCode.aspx?email=some@email.com&pwd=secretPassword
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/requestAuthCode.aspx">
<input name="email" value="some@email.com">
<input name="pwd" value="secretPassword">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=requestAuthCode.
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");
$sEmail = "some@email.com";
$sPwd = "secretPassword";
$requestauthcodeparams = array(
'sEmail' => $sEmail,
'sPassword' => $sPwd
);
$requestAuthCodeResult = $soapclient->requestAuthCode($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 sEmail = "some@email.com";
string sPwd = "secretpassword";
HttpWebRequest oRequestAuthCode = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "requestAuthCode.aspx?email=" + sEmail + "&pwd=" + sPwd);
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 sEmail = "some@email.com";
string sPwd = "secretpassword";
string sAuthCode = "";
WebServiceClients.requestAuthCodeRet oRequestAuthCode = proxy.requestAuthCode
(sEmail, sPwd, out sAuthCode);
Response.Write(oRequestAuthCode + "<br />");
Response.Write("authCode: " + sAuthCode);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestAuthCodeSSO
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;
namespace TestingAPI
{
internal class Program
{
static void Main(string[] args)
{
try
{
string sSSOID = "email@domain.com";
string sPwd = "password";
int sCompany = 111111;
RescueAPI.APISoapClient aPISoapClient = new RescueAPI.APISoapClient(new RescueAPI.APISoapClient.EndpointConfiguration()); RescueAPI.requestAuthCodeSSORequest request = new RescueAPI.requestAuthCodeSSORequest(sSSOID, sPwd, sCompany); RescueAPI.requestAuthCodeSSOResponse response = aPISoapClient.requestAuthCodeSSOAsync(request).Result; Console.WriteLine(response.requestAuthCodeSSOResult + " " + response.sAuthCode);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
requestPINCode
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK PINCODE:123456
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
Sample Code
The following are examples for using the requestPINCode method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/requestPINCode.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/requestPINCode.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<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=requestPINCode.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestPINCodeParams = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestPINCodeResult = $soapclient->requestPINCode($requestPINCodeParams);
//print out the PIN Code full response
print_r("<b>requestPINCode full response.</b><br />");
print_r($requestPINCodeResult);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestPINCodeResult["iPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestPINCode.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestPINCode result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestPINCode Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
int iPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestPINCodeRet oRequestPINCode = proxy.requestPINCode
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out iPIN);
Response.Write(oRequestPINCode + "<br />");
Response.Write("PIN code: " + iPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestPINCode - EU (v2)
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK PINCODE:012345
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
Sample Code
The following are examples for using the requestPINCode_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.eu/API/requestPINCode_v2.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.eu/API/requestPINCode.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<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=requestPINCodeV2.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestPINCodeParams = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestPINCodeResult = $soapclient->requestPINCode($requestPINCodeParams);
//print out the PIN Code full response
print_r("<b>requestPINCode full response.</b><br />");
print_r($requestPINCodeResult);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestPINCodeResult["sPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.eu/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestPINCode.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestPINCode result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestPINCode Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
string sPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestPINCodeRet oRequestPINCode = proxy.requestPINCode
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out sPIN);
Response.Write(oRequestPINCode + "<br />");
Response.Write("PIN code: " + sPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestPINCode_v3
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
NodeId | The ID (NodeID) of the technician for whom the PIN code has been generated.
Note: This applies to Administrators with a technician license, too.
|
Output
OK PINCODE:012345
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
Sample Code
The following are examples for using the requestPINCode_v3 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.eu/API/requestPINCode_v3.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.eu/API/requestPINCode.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<input name="authcode" value="4ahx...80u0">
<input name="NodeId" value="0">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=requestPINCodeV3.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestPINCodeParams = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestPINCodeResult = $soapclient->requestPINCode($requestPINCodeParams);
//print out the PIN Code full response
print_r("<b>requestPINCode full response.</b><br />");
print_r($requestPINCodeResult);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestPINCodeResult["sPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.eu/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestPINCode.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestPINCode result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestPINCode Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
string sPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestPINCodeRet oRequestPINCode = proxy.requestPINCode
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out sPIN);
Response.Write(oRequestPINCode + "<br />");
Response.Write("PIN code: " + sPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestLensPINCode
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK PINCODE:123456
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
NO_ACCESS_TO_LENS | Requesting a PIN code failed because the current user does not have permission to access Rescue Lens. |
Sample Code
The following are examples for using the requestLensPINCode method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/requestLensPINCode.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/requestLensPINCode.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<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=requestLensPINCode.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestLensPINCodeParams = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestLensPINCodeResult = $soapclient->requestLensPINCode($requestLensPINCodeParams);
//print out the PIN Code full response
print_r("<b>requestLensPINCode full response.</b><br />");
print_r($requestLensPINCodeResult);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestLensPINCodeResult["iPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestLensPINCode.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestLensPINCode result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestLensPINCode Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
int iPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestLensPINCodeRet oRequestLensPINCode = proxy.requestLensPINCode
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out iPIN);
Response.Write(oRequestLensPINCode + "<br />");
Response.Write("PIN code: " + iPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestLensPINCode_v2
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK PINCODE:123456
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
NO_ACCESS_TO_LENS | Requesting a PIN code failed because the current user does not have permission to access Rescue Lens. |
Sample Code
The following are examples for using the requestLensPINCode_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/requestLensPINCode_v2.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/requestLensPINCode_v2.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<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=requestLensPINCodeV2.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestLensPINCode_v2Params = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestLensPINCode_v2Result = $soapclient->requestLensPINCode($requestLensPINCode_v2Params);
//print out the PIN Code full response
print_r("<b>requestLensPINCode_v2 full response.</b><br />");
print_r($requestLensPINCodeResult_v2);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestLensPINCode_v2Result["iPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestLensPINCode_v2.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestLensPINCode_v2 result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestLensPINCode_v2 Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
int iPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestLensPINCodeRet oRequestLensPINCode = proxy.requestLensPINCode_v2
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out iPIN);
Response.Write(oRequestLensPINCode + "<br />");
Response.Write("PIN code: " + iPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestLensPINCode_v3
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
PhoneNumber | The phone number to which the invitation SMS containing the PIN Code is to be sent. Optional. |
LangCode | The code of the language in which the invitation SMS is to be sent. Possible values:
|
Output
OK PINCODE:123456
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
NO_ACCESS_TO_LENS | Requesting a PIN code failed because the current user does not have permission to access Rescue Lens. |
INVALID_PHONENUMBER | The phone number to which the SMS was to be sent is not valid. |
SMS_CANNOT_BE_SENT | The SMS cannot be delivered to the recipient. |
NO_MORE_SMS | The Rescue account has used up all of its allocated SMSs. |
Sample Code
The following are examples for using the requestLensPINCode_v3 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/requestLensPINCodev3.aspx?cfield0=custom1
&cfield1=custom2&cfield2=custom3&cfield3=custom3&cfield4=custom4&
cfield5=custom5&tracking0=track0¬echconsole=0&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/requestLensPINCodev3.aspx">
<input name="cfield0" value="custom0">
<input name="cfield1" value="custom1">
<input name="cfield2" value="custom2">
<input name="cfield3" value="custom3">
<input name="cfield4" value="custom4">
<input name="cfield5" value="custom5">
<input name="tracking0" value="track0">
<input name="notechconsole" value="0">
<input name="authcode" value="4ahx...80u0">
<input name="PhoneNumber" value="0">
<input name="LangCode" value="0">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=requestLensPINCodeV3.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestLensPINCode_v3Params = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestLensPINCode_v3Result = $soapclient->requestLensPINCode($requestLensPINCode_v3Params);
//print out the PIN Code full response
print_r("<b>requestLensPINCode_v3 full response.</b><br />");
print_r($requestLensPINCodeResult_v3);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestLensPINCode_v3Result["iPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx? for
each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint +
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the PINCode info
HttpWebRequest oReqPINCode = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "requestLensPINCode_v3.aspx");
oReqPINCode.CookieContainer = sessioncookie;
HttpWebResponse oRespPINCode = (HttpWebResponse)oReqPINCode.GetResponse();
string sRespPINCode = new StreamReader(oRespPINCode.GetResponseStream()).ReadToEnd();
Response.Write("requestLensPINCode_v3 result: " + sRespPINCode + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API requestLensPINCode_v3 Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
int iPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestLensPINCodeRet oRequestLensPINCode = proxy.requestLensPINCode_v3
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out iPIN);
Response.Write(oRequestLensPINCode + "<br />");
Response.Write("PIN code: " + iPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
requestLensPINCode_v4
Input Parameters
Element | Description |
---|---|
cfield0 | Custom field 0. The maximum length is 64 characters. Optional. |
cfield1 | Custom field 1. The maximum length is 512 characters. Optional. |
cfield2 | Custom field 2. The maximum length is 512 characters. Optional. |
cfield3 | Custom field 3. The maximum length is 256 characters. Optional. |
cfield4 | Custom field 4. The maximum length is 64 characters. Optional. |
cfield5 | Custom field 5. The maximum length is 64 characters. Optional. |
tracking0 | Tracking field 0. The maximum length is 64 characters. Optional. |
notechconsole | Specifies if running the Technician Console is required (0) or not (1). Optional, default is 0. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
PhoneNumber | The phone number to which the invitation SMS containing the PIN Code is to be sent. Optional. |
LangCode | The code of the language in which the invitation SMS is to be sent. Possible values:
|
NodeId | The ID (NodeID) of the technician for whom the PIN code has been generated.
Note: This applies to Administrators with a technician license, too.
|
Output
OK PINCODE:123456
SMS_RESULT: sendInvitationForMobileSession_OK
PINCODE: The 6-digit long PIN code to start a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Requesting a PIN code succeeded. |
NOTLOGGEDIN | Requesting a PIN code failed because the current user is no longer logged in. |
NOTTECHNICIAN | The PIN code was not requested by a technician. |
NOTECHCONSOLERUNNING | The technician is offline and the Technician Console is not running, but it is possible to request a session for an offline technician. |
OUTOFPINCODES | There are no more PIN codes that can be generated. |
POLLRATEEXCEEDED | The specified interval of requesting a new PIN code is too short. |
INVALID_SECRETAUTHCODE | The authentication code is incorrect. |
USER_IS_DELETED | The user whose authorization code was specified is already deleted. |
USER_DELETED_OR_DISABLED | The user whose authorization code was specified is already deleted or disabled. |
NO_ACCESS_TO_LENS | Requesting a PIN code failed because the current user does not have permission to access Rescue Lens. |
INVALID_PHONENUMBER | The phone number to which the SMS was to be sent is not valid. |
SMS_CANNOT_BE_SENT | The SMS cannot be delivered to the recipient. |
NO_MORE_SMS | The Rescue account has used up all of its allocated SMSs. |
Sample Code
The following are examples for using the requestLensPINCode_v4 method that you can call in your environment.
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=requestLensPINCodeV4.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//get account info
$sCField0 = "some customer";
$sCField1 = "first custom field";
$sCField2 = "second custom field";
$sCField3 = "third custom field";
$sCField4 = "fourth custom field";
$sCField5 = "fifth custom field";
$sTracking0 = $sCField0 . date("c"); //to ensure unique
//create params array for SOAP request
$requestLensPINCode_v4Params = array(
'sCField0' => $sCField0,
'sCField1' => $sCField1,
'sCField2' => $sCField2,
'sCField3' => $sCField3,
'sCField4' => $sCField4,
'sCField5' => $sCField5,
'sTracking0' => $sTracking0
);
$requestLensPINCode_v4Result = $soapclient->requestLensPINCode($requestLensPINCode_v4Params);
//print out the PIN Code full response
print_r("<b>requestLensPINCode_v4 full response.</b><br />");
print_r($requestLensPINCodeResult_v4);
echo "<br /><br />"; //formatting
//show the PIN code only
$PINCode = $requestLensPINCode_v4Result["iPINCode"];
//print PIN Code
print_r("<b>PIN Code.</b><br />");
print_r($PINCode);
?>
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";
string sAuthCode = "";
string sCField0 = "";
string sCField1 = "";
string sCField2 = "";
string sCField3 = "";
string sCField4 = "";
string sCField5 = "";
string sTracking0 = "";
int iPIN;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.requestLensPINCodeRet oRequestLensPINCode = proxy.requestLensPINCode_v4
(sCField0, sCField1, sCField2, sCField3, sCField4, sCField5, sTracking0, true, sAuthCode,
out iPIN);
Response.Write(oRequestLensPINCode + "<br />");
Response.Write("PIN code: " + iPIN);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
Handling Pre-Session and Post-Session Data (Post-to-URL)
Post to URL allows you to host your own server script to handle the Rescue session data and to process them as you see fit. Some potential use examples include database importing and email notifications.
Post-to-URL Variables
The following data is saved before the technician starts a Rescue session:
Session Data | Description |
---|---|
SessionID | Rescue Session ID |
TechID | Technician ID |
TechSSOID | Technician Single Sign-on ID (as defined on the Organization tab in the Administration Center) |
TechName | Technician name (as defined on the Organization tab) |
TechEmail | Technician email (as defined on the Organization tab) |
TechDescr | Technician description (as defined on the Organization tab) |
CField0 | Value returned for the Name field (as defined on the Global Settings tab in the Administration Center) |
CField1 | Value returned for Custom field 1 (as defined on the Global Settings tab) |
CField2 | Value returned for Custom field 2 (as defined on the Global Settings tab) |
CField3 | Value returned for Custom field 3 (as defined on the Global Settings tab) |
CField4 | Value returned for Custom field 4 (as defined on the Global Settings tab) |
CField5 | Value returned for Custom field 5 (as defined on the Global Settings tab) |
Tracking0 | Value returned for the Tracking field; typically used for mapping Rescue sessions to a CRM. If a customer can ask for assistance from multiple websites, the tracking0 field may contain, for example, the identifier of the website that the customer visited. |
ChatLog | Transcript of all chat held since the previous post. |
Notes | Notes saved by the technician. This is always empty at the beginning of the session. |
WaitingTime | From the beginning of Waiting status until session start (Active status) in seconds |
PickupTime | The exact time when the session entered Active status (UTC) |
ClosingTime | The exact time when the session entered Closed or Timed Out status (UTC) |
WorkTime | Actual Technician Console utilization time during the session (until the post) in seconds. This is always empty at the beginning of the session. |
LastActionTime | The exact time of the last action taken by the technician in the Technician Console (UTC). This is always empty at the beginning of the session. |
Transmitted | Amount of data transmitted during the session (until the post) in bytes. This is always empty at the beginning of the session. |
Platform | The platform of the customer device |
The following data is saved at the end of a Rescue session in addition to the data that is saved at the beginning of the session:
Session Data | Description |
---|---|
TSurvey0..9 | Value returned for Technician Survey Question 1 to 10 (as defined on the Settings tab). |
How it Works
- The Rescue technician starts a support session
- At the beginning and/or end of a session, the session data are transferred via HTTP Post or XML to the specified URL
- Your script processes the data as specified in your code
HTTP Post based
https://example.com/script.aspx]?SessionID=[...]&TechID=[...]&TechSSOID=[...]
&TechDescr=[...]&CField0=[...]&CField1=[...]&CField2=[...]&CField3=[...]
&CField4=[...]&CField5=[...]&Tracking0=[...]&ChatLog=[...]&
Notes=[...]&WaitingTime=[...]&PickupTime=[...]&ClosingTime=[...]&
WorkTime=[...]&LastActionTime=[...]&Transmitted=[...]&TSurvey0=[...]&
TSurvey1=[...]&TSurvey2=[...]&TSurvey3=[...]&TSurvey4=[...]&TSurvey5=[...]&
TSurvey6=[...]&TSurvey7=[...]&TSurvey8=[...]&TSurvey9=[...]
Session Management
getSession
Input Parameters
Element | Description |
---|---|
node | The sessions of this node are listed. This is an optional element. If the ID of a node i not specified, it returns all existing sessions for all technicians and channels. Required. |
noderef | The reference of the node, which can be NODE or CHANNEL. Optional, default is NODE. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK ID|Status|Entry ID|Entry|Technician ID|Technician|Start Time|Waiting Time|Custom Field 0|
Custom Field 1|Custom Field 2|Language|Transferred To|Transferred Comment|Is Lead Technician|
HandingOff|1663112|Waiting|0||337366|John Doe|2/16/2012 9:00 AM|13|Customer|||en|||yes||
The list that the getSession method retrieves contains information about a session in a table. This table has the following columns:
- ID: Session ID
- Status: Session status
Possible values:
- Aborted: technician was deleted or disabled
- Active
- Closed by active customer
- Closed by customer
- Closed by technician
- Closed by waiting customer
- Connecting
- Disconnected
- Not available
- Offline
- On Hold
- Rebooted
- Rebooting
- Reconnecting
- Timed out
- Timed out: closed by technician
- Transferred
- Transferring
- Waiting
- Entry ID: Channel's ID
- Entry: Channel's name
- Technician ID: Technician's ID
- Technician: Technician's name
- Start Time: Start time of the session
- Waiting Time: Time elapsed since the last session status change
- Custom Field 0-2: Custom fields that the Technician fills in when he initiates a session
- Language: The two-digit language code of the customer's operation system
- Transferred To: The recipient Technician of a transferred session
- Transferred Comment: Comment to the recipient Technician when a session transferred
- Is Lead Technician: Denotes whether the technician of the session is the lead technician
- HandingOff: Denotes whether the session was handed over to the technician
Session List Elements
The table containing the session list has the following elements:
Session list element | Content |
---|---|
<sessions> | <session_header> <session_rows> |
<session_header> | <field_value> <delimiter> <session_header> | <field_value> <new_line_char> |
<session_rows> | <session_row> <session_row> | <session_row> |
<session_row> | <field_value> <delimiter> <session_row> | <field_value> <new_line_char> |
<field_value> | <char> <field_value> | <char> |
<char> | [.] |
<new_line_char> | '\n' |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving session information succeeded. |
NOTLOGGEDIN | Retrieving session information failed because the current is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing node. |
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 getSession method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getSession.aspx?node=337366&noderef=NODE
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getSession.aspx">
<input name="node" value=337366>
<input name="noderef" value=NODE>
<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=getSession.
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");
//define variables
$sEmail = "someEmail@domain.com";
$sPassword = "secretPassword";
$iNodeID = "337366"; //define this with your own data
$eNodeRef = "NODE"; //define this appropriately based on your data
$sAuthCode = "4ahx...80u0";
//define parameters
$loginparams = array (
'sEmail' => $sEmail,
'sPassword' => $sPassword);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//switch to XML for easier formatting of output
$output = array(
'eOutput' => "XML"
);
$outputResponse = $soapclient->setOutput($output);
print_r("<b>setOutput Full response.</b> <br />");
print_r($outputResponse);
echo "<br /><br />"; //formatting
//set up array for getSession
$sessionparams = array(
'iNodeID' => $iNodeID,
'eNodeRef' => $eNodeRef,
'sAuthCode' => $sAuthCode
);
//get session(s)
$sessionresult = $soapclient->getSession($sessionparams);
//show the full getSession response
print_r("<b>getSession Text full response.</b><br />");
print_r($sessionresult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx?
for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the Session info
//remember to tag your intended node to the URL
int iNode = "";
string eNodeRef = "NODE";
HttpWebRequest oReqSession = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getSession.aspx?node=" + sNode + "&noderef=" + eNodeRef + "&authcode=" + sAuthCode);
oReqSession.CookieContainer = sessioncookie;
HttpWebResponse oRespSession = (HttpWebResponse)oReqSession.GetResponse();
string sRespSession = new StreamReader(oRespSession.GetResponseStream()).ReadToEnd();
Response.Write("getSession result: " + sRespSession + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API getSession Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "4ahx...80u0";
int iNodeID = 337366;
NODE_REF eNodeRef = NODE_REF.NODE;
SESSION[] aSessions;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.getSessionRet oGetSession = proxy.getSession(iNodeID,
eNodeRef, sAuthCode, out aSessions);
Response.Write(oGetSession + "<br />");
foreach(SESSION s in aSessions)
{
Response.Write("Session ID: " + s.iID + " Technician: " + s.sTechnician);
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
getSession_v2
Changes in Version 2 of getSession
- IsLead
- Denotes whether the technician of the session is the lead technician.
- HandingOff
- Denotes whether the session was handed over to the technician.
Input Parameters
Element | Description |
---|---|
node | The sessions of this node are listed. Required. |
noderef | The reference of the node, which can be NODE or CHANNEL. Optional, default is NODE. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK ID|Status|Entry ID|Entry|Technician ID|Technician|Start Time|Waiting Time|Custom Field 0|
Custom Field 1|Custom Field 2|Language|Transferred To|Transferred Comment|Is Lead Technician|
HandingOff|1663112|Waiting|0||337366|John Doe|2/16/2012 9:00 AM|13|Customer|||en|||yes||
The list that the getSession method retrieves contains information about a session in a table. This table has the following columns:
- ID: Session ID
- Status: Session status
Possible values:
- Aborted: technician was deleted or disabled
- Active
- Closed by active customer
- Closed by customer
- Closed by technician
- Closed by waiting customer
- Connecting
- Disconnected
- Not available
- Offline
- On Hold
- Rebooted
- Rebooting
- Reconnecting
- Timed out
- Timed out: closed by technician
- Transferred
- Transferring
- Waiting
- Entry ID: Channel's ID
- Entry: Channel's name
- Technician ID: Technician's ID
- Technician: Technician's name
- Start Time: Start time of the session
- Waiting Time: Time elapsed since the last session status change
- Custom Field 0-2: Custom fields that the Technician fills in when he initiates a session
- Language: The two-digit language code of the customer's operation system
- Transferred To: The recipient Technician of a transferred session
- Transferred Comment: Comment to the recipient Technician when a session transferred
- Is Lead Technician: Denotes whether the technician of the session is the lead technician
- HandingOff: Denotes whether the session was handed over to the technician
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving session information succeeded. |
NOTLOGGEDIN | Retrieving session information failed because the current is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing node. |
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 getSession_v2 method that you can call in your environment.
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
int iNodeID = 337366;
NODE_REF eNodeRef = NODE_REF.NODE;
SESSION_V2[] aSessions;
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.getSessionRet oGetSessionV2 = proxy.getSession_V2(iNodeID, eNodeRef, sAuthCode, out aSessions);
Response.Write(oGetSessionV2 + "<br />");
foreach (SESSION_V2 s in aSessions)
{
Response.Write("Session ID: " + s.iID + " Technician: " + s.sTechnician);
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
getSession_v3
Changes in Version 3 of getSession
- sCustomField3, sCustomField4, and sCustomField5
- The content of custom fields 3, 4, and 5.
The following session statuses have been introduced in the getSession_v3 method:
- SESSION_UACCESS_EXPIRED_WASPICKEDUPBEFORE
- The unattended access expired and it was picked up by the technician.
- SESSION_UACCESS_EXPIRED_NOTPICKEDUPBEFORE
- The unattended access expired without the technician picking it up.
- SESSION_UACCESS_REVOKEDBYCUSTOMER_WASPICKEDUPBEFORE
- The customer revoked the unattended access right from the technician who accessed the customer's computer.
- SESSION_UACCESS_REVOKEDBYCUSTOMER_NOTPICKEDUPBEFORE
- The customer revoked the unattended access right from the technician who did not access the customer's computer.
- SESSION_UACCESS_REVOKEDBYADMIN_WASPICKEDUPBEFORE
- The admin revoked the unattended access right from the technician who accessed the customer's computer.
- SESSION_UACCESS_REVOKEDBYADMIN_NOTPICKEDUPBEFORE
- The admin revoked the unattended access right from the technician who did not access the customer's computer.
- SESSION_TERMSANDCONDITIONSDECLINED
- The access was declined by the customer by not accepting the terms and conditions.
- SESSION_TIMEOUT_TECHCONNECTIONLOSTORSESSIONWASNOTCLOSEDBYTECH
- The session timed out or it was closed by the customer.
Input Parameters
Element | Description |
---|---|
node | The sessions of this node are listed. Required. |
noderef | The reference of the node, which can be NODE or CHANNEL. Optional, default is NODE. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK ID|Status|Entry ID|Entry|Technician ID|Technician|Start Time|Waiting Time|Custom Field 0|
Custom Field 1|Custom Field 2|Custom Field 3|Custom Field 4|Custom Field 5|Language|
Transferred To|Transferred Comment|Is Lead Technician|HandingOff|
1663356|Active|0||337366|John Doe|2/16/2012 4:49 PM|104|Customer||||||en|||yes||
The list that the getSession_v3 method retrieves contains information about a session in a table. This table has the following columns:
- ID: Session ID
- Status: Session status
Possible values:
- Aborted: technician was deleted or disabled
- Active
- Closed by active customer
- Closed by customer
- Closed by technician
- Closed by waiting customer
- Connecting
- Declined by customer
- Disconnected
- Expired
- Not available
- Offline
- On Hold
- Rebooted
- Rebooting
- Reconnecting
- Revoked
- Timed out
- Timed out: closed by technician
- Transferred
- Transferring
- Waiting
- Entry ID: Channel's ID
- Entry: Channel's name
- Technician ID: Technician's ID
- Technician: Technician's name
- Start Time: Start time of the session
- Waiting Time: Time elapsed since the last session status change
- Custom Field 0-5: Custom fields that the Technician fills in when he initiates a session
- Language: The two-digit language code of the customer's operation system
- Transferred To: The recipient Technician of a transferred session
- Transferred Comment: Comment to the recipient Technician when a session transferred
- Is Lead Technician
- HandingOff
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving session information succeeded. |
NOTLOGGEDIN | Retrieving session information failed because the current is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is not the ID of an existing node. |
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 getSession_v3 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getSession_v3.aspx?node=337366
&noderef=NODE&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getSession_v3.aspx">
<input name="node" value="337366">
<input name="noderef" value="NODE">
<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=getSession_V3.
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");
//define variables
$sEmail = "someEmail@domain.com";
$sPassword = "secretPassword";
$iNodeID = "337366"; //define this with your own data
$eNodeRef = "NODE"; //define this appropriately based on your data
$sAuthCode = "4ahx...80u0";
//define parameters
$loginparams = array (
'sEmail' => $sEmail,
'sPassword' => $sPassword);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//switch to XML for easier formatting of output
$output = array(
'eOutput' => "XML"
);
$outputResponse = $soapclient->setOutput($output);
print_r("<b>setOutput Full response.</b> <br />");
print_r($outputResponse);
echo "<br /><br />"; //formatting
//set up array for getSession_v3
$sessionparams = array(
'iNodeID' => $iNodeID,
'eNodeRef' => $eNodeRef,
'sAuthCode' => $sAuthCode
);
//get session(s)
$sessionresult = $soapclient->getSession_v3($sessionparams);
//show the full getSession response
print_r("<b>getSession Text full response.</b><br />");
print_r($sessionresult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx?
for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the Session info
//remember to tag your intended node to the URL
int iNode = "";
string eNodeRef = "NODE";
HttpWebRequest oReqSession = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getSession_v3.aspx?node=" + sNode + "&noderef=" + eNodeRef + "&authcode=" + sAuthCode);
oReqSession.CookieContainer = sessioncookie;
HttpWebResponse oRespSession = (HttpWebResponse)oReqSession.GetResponse();
string sRespSession = new StreamReader(oRespSession.GetResponseStream()).ReadToEnd();
Response.Write("getSession result: " + sRespSession + "<br />"); //You can customize
the response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API getSession Test</title>
</head>
<body>
</body>
</html>
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";
string sAuthCode = "4ahx...80u0";
int iNodeID = 337366;
NODE_REF eNodeRef = NODE_REF.NODE;
SESSION_V3[] aSessions;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.getSessionRet oGetSession = proxy.getSession_v3(iNodeID,
eNodeRef, sAuthCode, out aSessions);
Response.Write(oGetSession + "<br />");
foreach(SESSION s in aSessions)
{
Response.Write("Session ID: " + s.iID + " Technician: " + s.sTechnician);
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
startSession
Input Parameters
Element | Description |
---|---|
session | The ID of the target session. Required. |
node | The session is picked up by this node. Required. |
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 | Starting a session succeeded. |
NOTLOGGEDINASADMIN | Starting a session failed because the administrator is not logged in. |
ACTIONFAILED | Starting a session failed because the technician is offline and the Technician Console is not running. |
INVALIDPARAM_SESSION | The ID of the session is incorrect. |
INVALIDPARAM_NODE | The ID of the user who starts the session is incorrect. |
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 startSession method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/startSession.aspx?session=12345678
&node=337366&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/startSession.aspx">
<input name="session" value="12345678">
<input name="node" value="337366">
<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=startSession.
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;
$sAuthCode = "4ahx...80u0";
$startsessionparams = array (
'iSessionID' => $iSessionID,
'iNodeID' => $iNodeID,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$startSessionResult = $soapclient->startSession($startsessionparams);
print_r($startSessionResult);
?>
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 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 oReqStartSession = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "startSession.aspx?session=" + iSession + "&node=" + iNodeID + "&authcode=" + sAuthCode);
HttpWebResponse oRespStartSession = (HttpWebResponse)
oReqStartSession.GetResponse();
string sRespStartSession = new StreamReader
(oRespStartSession.GetResponseStream()).ReadToEnd();
Response.Write(sRespStartSession);
}
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;
string sAuthCode = "4ahx...80u0";
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.startSessionRet oStartSession = proxy.startSession
(iSession, iNodeID, sAuthCode);
Response.Write(oStartSession);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
holdSession
Input Parameters
Element | Description |
---|---|
session | The ID of the target session. Required. |
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 | Putting the session on hold succeeded. |
NOTLOGGEDINASADMIN | Putting the session on hold failed because the administrator is not logged in. |
ACTIONFAILED | Putting the session on hold failed because, for example, the session is on hold. |
INVALIDPARAM_SESSION | The type of the session ID is incorrect. The type must be an integer. |
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 holdSession method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/holdSession.aspx?session=12345678&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/holdSession.aspx">
<input name="session" value=12345678>
<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=holdSession.
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
$sAuthCode = "4ahx...80u0";
$holdsessionparams = array (
'iSessionID' => $iSessionID,
'sAuthCode' => ''
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$holdSessionResult = $soapclient->holdSession($holdsessionparams);
print_r($holdSessionResult);
?>
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";
//sAuthCode is the return value from the requestAuthCode API
string sAuthCode = "4ahx...80u0";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream())
.ReadToEnd();
Response.Write(sRespLogin + "<br />");
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebRequest oReqHoldSession = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "holdSession.aspx?session=123456&authcode=" + sAuthCode);
oReqHoldSession.CookieContainer = sessioncookie;
HttpWebResponse oRespHoldSession = (HttpWebResponse)
oReqHoldSession.GetResponse();
string sRespHoldSession = new StreamReader(oRespHoldSession
.GetResponseStream()).ReadToEnd();
Response.Write(sRespHoldSession + "<br />");
}
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";
string sAuthCode = "4ahx...80u0";
int iSession = 12345678;
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.holdSessionRet oHoldSession = proxy.holdSession(iSession,
sAuthCode);
Response.Write(oHoldSession + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
transferSession
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);
}
}
}
}
closeSession
Input Parameters
Element | Description |
---|---|
session | The ID of the target session. Required. |
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 | Closing the session succeeded. |
NOTLOGGEDINASADMIN | Closing the session failed because the administrator is not logged in. |
ACTIONFAILED | Closing a session failed because the technician is offline and the Technician Console is not running. |
INVALIDPARAM_SESSION | The ID of the session is incorrect. |
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 closeSession method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/closeSession.aspx?session=12345678
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/closeSession.aspx">
<input name="session" value="12345678">
<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=closeSession.
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'
);
$cancelactionparams = array (
'iSession' => 12345678,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$closeSessionResult = $soapclient->closeSession($closesessionparams);
print_r($closeSessionResult);
?>
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;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEndpoint = "https://secure.logmeinrescue.com/api/";
string sEmail = "some@email.com"; //Rescue account email address
string sPwd = "secretPassword"; //Rescue account password
int iSession = 12345678; //Session ID goes here
string sAuthCode = "4ahx...80u0";
//Login
HttpWebRequest oLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx?email=" + sEmail + "&pwd=" + sPwd);
oLogin.CookieContainer = new CookieContainer();
//Get login response
HttpWebResponse oLoginResp = (HttpWebResponse)oLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream()).ReadToEnd();
Response.Write("Login status: " + sLoginResp + "<br />");
//Add session cookie to CookieContainer to persist login
CookieContainer sessioncookie = oLogin.CookieContainer;
//Close the session
HttpWebRequest oCloseSession = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "closeSession.aspx?session=" + iSession + "&authcode=" + sAuthCode);
oCloseSession.CookieContainer = sessioncookie;
//Get closeSession response
HttpWebResponse oCloseSessionResp = (HttpWebResponse)oCloseSession.GetResponse();
string sCloseSessionResp = new StreamReader(oCloseSessionResp.
GetResponseStream()).ReadToEnd();
Response.Write("Session: " + sCloseSessionResp);
}
}
}
C# with SOAP
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 APIexamples.WebServiceClients;
namespace APIexamples
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string sEmail = "some@email.com"; //Rescue account email address
string sPwd = "secretPassword"; //Rescue account password
int iSession = 12345678; //ID of session to close
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
//Login
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin.ToString() + "<br />"); //You can customize the response
//Close session
WebServiceClients.closeSessionRet oCloseSession = proxy.closeSession(iSession,
sAuthCode);
Response.Write(oCloseSession.ToString()); //You can customize the response
}
}
}
cancelAction
Input Parameters
Element | Description |
---|---|
session | The ID of the target session. Required. |
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 | Cancelling the action succeeded. |
NOTLOGGEDINASADMIN | Cancelling the action failed because the administrator is not logged in. |
ACTIONFAILED | Cancelling the action failed because the technician is offline and the Technician Console is not running. |
INVALIDPARAM_SESSION | The ID of the session on which you want to cancel an action is incorrect. |
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 cancelAction method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/cancelAction.aspx?session=12345678
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/cancelAction.aspx">
<input name="session" value="12345678">
<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=cancelAction.
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'
);
$cancelactionparams = array (
'iSession' => 12345678,
'sAuthCode' => '4ahx...80u0'
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$cancelActionResult = $soapclient->cancelAction($cancelactionparams);
print_r($cancelActionResult);
?>
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;
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";
//ID of the session
int iSession = 12345678;
//sAuthCode is the return value from the requestAuthCode API
string sAuthCode = "4ahx...80u0";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
string sRespLogin = new StreamReader(oRespLogin.GetResponseStream())
.ReadToEnd();
Response.Write(sRespLogin + "<br />");
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebRequest oReqCancelAction = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "cancelAction.aspx?session=" + iSession + "&authcode=" + sAuthCode);
oReqCancelAction.CookieContainer = sessioncookie;
HttpWebResponse oRespCancelAction = (HttpWebResponse)oReqCancelAction
.GetResponse();
string sRespCancelAction = new StreamReader(oRespCancelAction.
GetResponseStream()).ReadToEnd();
Response.Write(sRespCancelAction + "<br />");
}
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;
string sAuthCode = "4ahx...80u0";
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.cancelActionRet oCancelAction = proxy.cancelAction
(iSession, sAuthCode);
Response.Write(oCancelAction + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
isAnyTechAvailableOnChannel
Input Parameters
Element | Definition |
---|---|
ChannelID | The ID of the channel in which you are looking for online technicians. Required. |
ExcludingAwayAndBusy | Determines whether away and busy statuses of technicians are considered as online. Optional.
The possible values are the following:
Setting this parameter to false disregards the status of the technician. If there is a technician on the channel, the return value of the isAnyTechAvailableOnChannel method will be true. Setting this parameter to true takes the status of technicians into account as follows:
|
Output
TRUE
TRUE / FALSE: See the description below
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | This return value is used for SOAP messages only and is displayed whenever the isAnyTechAvailableOnChannel method is called. |
TRUE | There is a technician available on the specified channel. If working hours are defined, the return value is TRUE if the following conditions are all true:
Note: If working hours are defined, the return value is also TRUE if there is an online technician, the Abort sessions and show this webpage to the customer option is selected, and a customer tries to start a session during non-working hours.
For information on defining working hours, see the Rescue Administration Center User Guide. |
FALSE | There is no technician available on the specified channel. If working hours are defined, the return value is FALSE if there is no online technician. For information on defining working hours, see the Rescue Administration Center User Guide. |
HASONLINETECHNICIANS | This return parameter is used for SOAP messages only and its value can be TRUE or FALSE depending on the conditions described above. |
Sample Code
The following are examples for using the isAnyTechAvailableOnChannel method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/isAnyTechAvailableOnChannel.aspx?
ChannelID=1902861082&ExcludingAwayAndBusy=true
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/
isAnyTechAvailableOnChannel.aspx">
<input name="ChannelID" value="1902861082">
<input name="ExcludingAwayAndBusy" value="true">
</form>
C# with SOAP
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
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
int iChannelID = [ID of channel node];
bool bExcludingAwayAndBusy = true;
bool bHasOnlineTechnicians;
//Get result
WebServiceClients.isAnyTechAvailableOnChannelRet isAnyTechAvailableResult =
proxy.isAnyTechAvailableOnChannel(iChannelID, bExcludingAwayAndBusy, out bHasOnlineTechnicians);
Response.Write(bHasOnlineTechnicians);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
Reporting
You can specify what information you need and how to display that information in your reports.
getChat
Input Parameters
Element | Description |
---|---|
session | The chat log of the specified session will be generated. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK CHATLOG:10:09 AM Connecting to: control.dev-app01.3amlabs.net (192.168.2.180:443)
10:09 AM Connected to Applet (RSA 2048 bits, AES256-SHA 256 bits) 10:09 AM Switched to P2P
10:09 AM Technician: Hello, how can I help you? 10:09 AM Customer Chris: I have problems
connecting an external drive. 10:09 AM Technician: Let me see what I can do for you.
10:10 AM Requesting Dashboard information. 10:10 AM Waiting for customer permission to view
system information. 10:10 AM Dashboard Memory information received. 10:10 AM Dashboard Drives
information received. 10:10 AM Dashboard OS information received. 10:10 AM Dashboard Scheduled
Tasks information received. 10:10 AM Dashboard Events information received. 10:10 AM Dashboard
CPU information received. 10:10 AM Dashboard Processes information received. 10:10 AM Remote
Control successfully initiated. 10:12 AM Technician: OK, you are all set. 10:12 AM The
technician ended the session.
Chatlog: The complete chat log of a session.
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving the chat log succeeded. |
NOTLOGGEDIN | Retrieving the chat log failed because the current user is no longer logged in. |
INVALIDPARAM_SESSION | The specified session ID is invalid. |
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 getChat method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getChat.aspx?session=12345678
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getChat.aspx">
<input name="session" value="12345678">
<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=getChat.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//set up array for getChat request
$iSessionID = "12345678"; //populate this dynamically
$sAuthCode = "4ahx...80u0";
$getChatParams = array(
'iSessionID' => $iSessionID,
'sAuthCode' => $sAuthCode
);
$getChatResult = $soapclient->getChat($getChatParams);
//print out the chat full response
print_r("<b>getChat full response.</b><br />");
print_r($getChatResult);
echo "<br /><br />"; //formatting
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/"; //add actionName.aspx?
for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session
oReq.CookieContainer = new CookieContainer();
//get the response
HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
string sResp = new StreamReader(oResp.GetResponseStream()).ReadToEnd();
Response.Write("Login result: " + sResp + "<br />"); //You can customize the response
/*
//debug cookies
foreach (Cookie cook in oResp.Cookies)
{
Response.Write("Cookie:" + "<br />");
Response.Write("Name: " + cook.Name + " " + "Value: " + cook.Value + "<br />");
Response.Write("Domain: " + cook.Domain + "<br />");
Response.Write("Path: " + cook.Path + "<br />");
Response.Write("Port: " + cook.Port + "<br />");
Response.Write("Secure: " + cook.Secure + "<br />");
Response.Write("When issued: " + cook.TimeStamp + "<br />");
Response.Write("Expires: " + cook.Expires + " " + "Expired? " + cook.Expired + "<br />");
Response.Write("Don't save: " + cook.Discard + "<br />");
Response.Write("Comment: " + cook.Comment + "<br />");
Response.Write("Uri for comments: " + cook.CommentUri + "<br />");
Response.Write("Version: RFC " + cook.Version + "<br />");
// Show the string representation of the cookie.
Response.Write("String: " + cook.ToString());
}*/
//add cookies to cookie container
CookieContainer sessioncookie = oReq.CookieContainer;
//get the Chat info
string sSession = "12345678"; //populate this sessionID dynamically
HttpWebRequest oReqChat = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "getChat.aspx?session=" + sSession + "&authcode=" + sAuthCode);
oReqChat.CookieContainer = sessioncookie;
HttpWebResponse oRespChat = (HttpWebResponse)oReqChat.GetResponse();
string sRespChat = new StreamReader(oRespChat.GetResponseStream()).ReadToEnd();
Response.Write("getChat result: " + sRespChat + "<br />"); //You can customize the
response
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Rescue API getChat Test</title>
</head>
<body>
</body>
</html>
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;
string sAuthCode = "4ahx...80u0";
string sChatLog = "";
WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
Response.Write(oLogin + "<br />");
WebServiceClients.getChatRet oGetChat = proxy.getChat(iSession,
sAuthCode, out sChatLog);
Response.Write(oGetChat + "<br />");
Response.Write(sChatLog + "<br />");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
getNote
Input Parameters
Element | Description |
---|---|
session | The notes of the specified session will be listed. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Output
OK NOTE:Customer had issue with connecting an external drive.
Note: Technician's notes on a session
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Retrieving notes succeeded. |
NOTLOGGEDIN | Retrieving notes failed because the current user is no longer logged in. |
INVALIDPARAM_SESSION | The specified session ID is invalid. |
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 getNote method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/getNote.aspx?session=12345678&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/getNote.aspx">
<input name="session" value="12345678">
<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=getNote.
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");
//define parameters
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
//login
$loginResult = $soapclient->login($loginparams);
//print the result
echo "<b>Login full response.</b><br />"; //formatting
print_r($loginResult);
echo "<br /><br />"; //formatting
//set up array for getNote request
$iSessionID = "iSessionID"; //populate this dynamically
$sAuthCode = "";
$getNoteParams = array(
'iSessionID' => $iSessionID,
'sAuthCode' => $sAuthCode
);
$getNoteResult = $soapclient->getNote($getNoteParams);
//print out the note full response
print_r("<b>getNote full response.</b><br />");
print_r($getNoteResult);
echo "<br /><br />"; //formatting
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
string sEndpoint = "https://secure.logmeinrescue.com/API/";
//add actionName.aspx? for each action called
string sEmail = "some@email.com";
string sPwd = "secretPassword";
string sAuthCode = "4ahx...80u0";
//set up the request
HttpWebRequest oReq = (HttpWebRequest)System.Net.WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
//create a cookie container to store the cookies for this session