GoTo Developer

How to use Postman API collections

The advantages to using Postman include:

  • Ability to authenticate and send API calls
  • Persistent data between sessions
  • Ability to modify, save, and duplicate calls
  • Added documentation - some calls have multiple 'Body' examples to show call syntax options
  • Ability to add your own documentation
  • Added environment files where you can maintain parameter values

Quickstart

If you are already using Postman and are familiar with the product and its use, all you need to do to get started is download the corresponding collection file for each API, then import the collection file into postman. The following sections are detailed instructions that will get you through your first successful API call.

Step 0. Install Postman

  1. Follow the directions at getpostman.com to install Postman.

Step 1. Download Postman Collection

  1. Download the postman collection object by clicking the download icon available in the top right of each API page.
  2. Import the collection into Postman.

Step 2. Sign up for a GoTo account

If you have not already done so, sign up for a GoTo account.

Step 3. Create or update an OAuth client

If you have not already done so, create an OAuth client for the product(s) you want to use.

  1. Follow the instructions at How to create an client.
  2. Set the Redirect URI to: https://oauth.pstmn.io/v1/callback

From the client, you will need the client ID and the client secret. You can add these into your Postman collection environment.

Step 4. Get authorization to access a product account

  1. Use the following URL to request an authorization code. For details see How to get an access token:
https://authentication.logmeininc.com/oauth/authorize?response_type=code&client_id={clientID}
  1. Click Send.
  2. If you are not logged into your GoTo account, a login window displays. Click Allow to give permission for API calls.
  3. A response is returned to the Redirect URI identified in your OAuth client. You will get a response in the URL line. It looks like the following:
https://oauth.pstmn.io/v1/callback?code=b93b51ef736acf25c...

Copy the authorization code and paste it into the Value field under the Parameters tab (or into the authCode value in the Postman environment file), with a Key name of code. **NOTE: ** In this example, the code is b93b51ef736acf25c... and is truncated. The code is quite long.

Step 5. Get an access token

  1. In Postman, use the GET Access Token call from a product API.
  2. In the Parameters tab, make sure the code value is the authorization code you received from the previous step above.
  3. In the Authorization tab, select OAuth 2.0 in the Type drop-down.
  4. Click Get New Access Token. To complete the form that displays, use the following table.
Key Value
Token Name Recognizable token name, e.g., 04 10 2021 - GoToWebinar
Grant Type Authorization Code
Access Token URL https://authentication.logmeininc.com/oauth/token
Client ID Client ID from your GoTo Developer OAuth client
Client Secret Client Secret from your GoTo Developer OAuth client
Scope Not used in this example
Client Authentication Send as Basic Auth Header

Click Send. You should receive the required data.

Response example

IMPORTANT: The access token and refresh token values are truncated. They are large values.

{
 "access_token": "eyJraWQiOiJvYXV0aHYyLmxt666...",
  "token_type": "Bearer",
  "refresh_token": "eyJraWQiOiJvYXV0aHYyLmxt999...",
  "expires_in": 3600,
  "account_key": "9999982253621659654",
  "account_type": "",
  "email": "mahar.singh@company.com",
  "firstName": "Mahar",
  "lastName": "Singh",
  "organizer_key": "8439885694023999999",
  "version": "3"
 }

Response data

The following is sample output.

Parameter Description
access_token OAuth access token
token_type The type of the access token (always "Bearer")
refresh_token Refresh token identifier, valid for 30 days, or until product logout
organizer_key GoTo product user organizer key
account_key GoTo product account key (may be blank)
account_type GoTo product type “personal” or “corporate” (may be missing or blank)
firstName GoTo product user organizer first name (G2M only)
lastName GoTo product user organizer last name (G2M only)
email GoTo product user organizer email (G2M only)
version The version of the access token

This access token can now be used to authorize API requests by setting it in the Authorization header with the following format: "Authorization: Bearer {access_token}".

Step 6. Make an API call

  1. Open any call from a collection – for example, Get Organizer from GoToMeeting.
  2. Click the Authorization tab under the call URL and select OAuth 2.0 from the Type menu.
  3. Paste the new access token into the Access Token field.
  4. Click Send.

In the Body section of the Postman window, you should see Status: 200 OK. The API body for a GET call should show the retrieved data. (Depending on the call, you may need to run a POST call to create data first).

You can choose Save or press Ctrl-S to save the call including the new token for future use.

Make any other changes necessary to the call.

You can save the key information to a Postman environment. This enables you to use variables in your Postman calls to pull in specific data.