How to Log In

Log In & Obtain Key

Resource URL
/moservices/rest/api/login
POST Parameters

Required parameters:

Parameter Description
usernameN/A
passwordN/A
User-AgentThis helps us route your API call appropriately. Default: apiuser

Examples

Logging in with the username “johnsmith@acme.com” and password “changeme”.

cURL:
curl -d "username=john&password=changeme&User-Agent=apiuser" -k -c tmpCookies.txt https://openmobile.ipass.com/moservices/rest/api/login
JAVA:
String loginURI = "/moservices/rest/api/login";
HttpPost loginPost = new HttpPost("https://openmobile.ipass.com" + loginURI);
 
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("username", username));
nameValuePairs.add(new BasicNameValuePair("password", password));
nameValuePairs.add(new BasicNameValuePair("User-Agent", "apiuser"));
loginPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
 
// Make the Login API call to authenticate 
HttpResponse loginResponse = httpClient.execute(loginPost);
 
// Consume content so the HTTPClient can be re-used
loginResponse.getEntity().consumeContent();
 
// Get Cookies from the Login API call
CookieStore cookieStore = ((AbstractHttpClient) httpClient).getCookieStore();
List<Cookie> cookies = cookieStore.getCookies();
 
// Set cookies for future API calls
httpClient.getParams().setParameter("Cookie", cookies);

Go to: Portal Home > REST API Overview

 

©2015 iPass Inc. All rights reserved. Terms of Use