Overview

The GoTo product SDKs for Java are Software Development Kits for the GoTo product REST APIs exposing the API calls as Java methods. They are available in source and binary formats and provide you with an easy and fast way to integrate your Java applications with the GoTo products. Currently we provide the following SDKs:

  • gotomeeting-api - SDK for the GoToMeeting REST API.
  • gotowebinar-api - SDK for the GoToWebinar REST API.
  • gototraining-api - SDK for the GoToTraining REST API.
  • goto-core-lib - Core library exposing methods to authenticate users and authorize the implementing project for access to the authenticated users' GoTo product account.

NOTE: The SDKs do NOT support:

  • GoToAssist Service Desk
  • GoToAssist Remote Support
  • GoToAssist Corporate
  • GoToAssist SeeIt
  • Admin
  • SCIM

The available SDKs are licensed under the SDK License Agreement.

Installation

1. Install from the Maven repository

All SDKs are available as packages on the Maven repository. To use them add a dependency on com.logmein.gotomeeting-api, com.logmein.gotowebinar-api, com.logmein.goto-core-lib in your project's pom.xml. For example, to use the SDK for GoToWebinar add the following dependency:

 

<dependency>
  <groupId>com.logmein</groupId>
  <artifactId>gotowebinar-api</artifactId>
  <version>2.0.1</version>
</dependency> 

 

2. Direct download

File Description File Size Download Link MD5 Checksum
GoTo Core Library   
GoTo Core Library Java SDK version 2.0.0 binaries 23 KB goto-core-lib-2.0.0.jar 3590f7a7fd1dd1df201bc2f989ed440d
GoTo Core Library Java SDK version 2.0.0 sources 13 KB goto-core-lib-2.0.0-sources.jar 5225f24ae5b81bc5f8e6e0d08c89639f
GoTo Core Library Java SDK version 2.0.0 documentation 69 KB goto-core-lib-2.0.0-javadoc.jar ededf9ebc1500f2499b5ecfafeed3c8c
GoToMeeting   
GoToMeeting Java SDK version 1.1.0 binaries 88 KB gotomeeting-api-1.1.0.jar 29d4e9b690e897b71a17579ec3754512
GoToMeeting Java SDK version 1.1.0 sources 62 KB gotomeeting-api-1.1.0-sources.jar d53eae7726cce389bbecd59ecb25fde7
GoToMeeting Java SDK version 1.1.0 documentation 265 KB gotomeeting-api-1.1.0-javadoc.jar 70cd7be38307f9c32565b73f3ce422bc
GoToTraining   
GoToTraining Java SDK version 1.00.0 binaries 54 KB gototraining-api-1.00.0.jar fb795aa49970b5f46afcc7731854f3df
GoToTraining Java SDK version 1.00.0 sources 39 KB gototraining-api-1.00.0-sources.jar 38af3f1ee2af51e8cbbe35e091edf644
GoToTraining Java SDK version 1.00.0 documentation 188 KB gototraining-api-1.00.0-javadoc.jar 15ae101ff55c500a3fc7c115b64de325
GoToWebinar   
GoToWebinar Java SDK version 2.0.1 binaries 133 KB gotowebinar-api-2.0.1.jar 2fc610ba5a9ecfef1d20b98f030641b6
GoToWebinar Java SDK version 2.0.1 sources 92 KB gotowebinar-api-2.0.1-sources.jar d39ab8d9edadd236cfd319868af4ba78
GoToWebinar Java SDK version 2.0.1 documentation 469 KB gotowebinar-api-2.0.1-javadoc.jar e41374bbd358e367244df2c27d6cfe89

 

To use the binaries reference the downloaded .jar files from your project. The source code for each SDK is distributed as a maven project which you can import using the IDE of your choice.

Getting started

The following tips assume that you already have

  • a GoTo product account
  • a GoTo developer account
  • a consumer key for the respective GoTo product. You obtain this key after creating an app in your developer account.

If you do not, please refer to steps 1-3 of our Getting started guide.

To integrate the GoTo product into your application you need to install the homonymous SDK as well as the core library for authentication. For example, to develop for GoToWebinar, you need to install gotowebinar-api and goto-core-lib.

Before you make any calls you need to authenticate and obtain an access token. We support two different ways of authentication:

OAuth Flow

The first step is to generate the authorization URL where the user's browser will be directed. For this you'll need your app's consumer key and optionally the URL where the user will be redirected after the authorization to use your application:

 

import com.logmein.gotocorelib.api;
import com.logmein.gotocorelib.api.model.TokenResponse;
...
String consumerKey = "nMf9SaIASQ7Jy94Ehyq8GcyopR4MQSbp";
String consumerSecret = "loHznAxTuXGfFaMQ";
OAuth2Api oauth2Api = new OAuth2Api(consumerKey, consumerSecret);
String authUrl = oauth2Api.GetOAuth2AuthorisationUrl(consumerKey); // => "https://api.getgo.com/oauth/v2/authorize?client_id=nMf9SaIASQ7Jy94Ehyq8GcyopR4MQSbp&response_type=code"

 

Then you need to direct your user's browser to this authorization URL. The user will now login with their GoTo product account credentials and click "Approve" to allow your application access to their product data. After approval, the user will be redirected and you need to capture this redirection URL in order to extract from it the OAuth flow response key. You will use the latter to obtain your access token, for example:

 

/* using HtmlUnit as a GUI-less browser simulation */
URL url = htmlPage.getUrl(); // as string: "http://example.com/redirect-url?code=a2647d1379894cc2001eb31689cacccc"
String responseKey = oauth2Api.getResponseKey(url); // => "a2647d1379894cc2001eb31689cacccc"
TokenResponse response = oauth2Api.getAccessTokenResponse(responseKey);
String accessToken = response.getAccessToken(); // => "RlUe11faKeyCWxZToK3nk0uTKAL"

 

Direct Login

If your project is non-browser-based or unable to send the product user through the OAuth flow, you can use the Direct Login method as an alternative:

 

import com.logmein.gotocorelib.api;
import com.logmein.gotocorelib.api.model.LoginResponse;
...
String userName = "test@test.com";
String userPassword = "abcxyz";
String consumerKey = "nMf9SaIASQ7Jy94Ehyq8GcyopR4MQSbp";
String consumerSecret = "loHznAxTuXGfFaMQ";
Authentication authApi = new OAuth2Api(consumerKey, consumerSecret);
TokenResponse response = authApi.directLogin(userName, userPassword);
String accessToken = response.getAccessToken(); // => "RlUe11faKeyCWxZToK3nk0uTKAL"

 

Token Refresh

When you get an access token, the response also includes a refresh token. At the end of your access token's lifetime, you can send the refresh token in a call to obtain a new access token and refresh token pair:

 

String refreshToken = response.getRefreshToken(); // => "d1cp20yB3hrFAKeTokenTr49EZ34kTvNK"
response = authApi.getAccessTokenUsingRefreshToken(refreshToken)

 

Further calls

Once you have obtained your access token you can perform any other call passing in the access token as a parameter. For example, to list the starting times of all scheduled meetings:

 

import com.logmein.gotogotomeeting.api;
import com.logmein.gotogotomeeting.api.model.UpcomingMeeting;
...
MeetingsApi meetingsApi = new MeetingsApi();
List<UpcomingMeeting> meetings = meetingsApi.getUpcomingMeetings(accessToken);
for (UpcomingMeeting m : meetings) {
    System.out.println(m.getStartTime());
}