How to use GoToConnect API to fetch account users and lines
Prerequisites
This article assumes you can make API calls successfully which requires:
- A GoTo Developer account
- An OAuth client
- An access token for super admin user on a GoToConnect account.
Note that we will use the terminology account in this guide instead of organization - the concept stays the same.
Fetch Accounts of the Authenticated User
You can use the /me
from the Admin API to fetch the accounts of the authenticated user. Here we assume that the given token is the one of the super admins.
cURL Example
curl \
'https://api.getgo.com/admin/rest/v1/me' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json'
Successful Response Example
{
...
"accounts": [
{
"key": "8887380153236031176710",
"name": "My Great Account",
...
},
...
,
{
"key": "88881601234581673744646",
"name": "My Other Great Account",
...
}
]
}
Note that a super admin could belong to more than one account.
List Users of an Account
Now that you have the account keys of the authenticated user, you can fetch a list of users and lines in these acccounts via the following API.
This API returns a list of all the users including their respective lines of the given account.
cURL Example
curl \
'https://api.jive.com/users/v1/users?accountKey={accountKey}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json'
Successful Response Example
{
"items":[
{
"userKey":"78888886011013972886849029",
"lines":[
]
},
{
"userKey":"764391408600712423079789789978",
"lines":[
{
"id":"edc91481-cd84-4c7b-9067-0ab014c81032",
"name":"Service test",
"number":"1000",
"organization":{
"id":"641860c6-9065-4d30-98e1-14aa4e6c59ec",
"name":"My Great Account"
}
}
]
}
]
}
- How do I get started?
- How to create a developer account
- How to create an OAuth client
- How to obtain an OAuth access token
- How to obtain an OAuth access token (in Node.js)
- How to Obtain and Use Refresh Tokens
- Migrating to New Token Retrieval with authentication.logmeininc.com
- How to use GoToConnect API to fetch account users and lines
- How to create, update and delete account users via Admin API
- Call Events Screen Pop Tutorial
- Send SMS tutorial
- How to use Voice Admin APIs
- How to create a channel and receiving notifications from GoTo services
- How to subscribe to and get call events
- Fetching Call Events Reports
- Make and Receive Calls using the Devices and Calls API
- GoTo Connect APIs Host Migration
- GoToWebinar webhooks
- How to use GoToWebinar webhooks
- What API information is available for GoToMyPC?
- How to Setup an Integration with Central
- How to Setup an Integration with Rescue
- Rescue iOS and Andriod SDK
- Introduction
- Java SDK
- .NET SDK
- Direct login migration
- How to use Postman API collections
- How much do the GoTo APIs cost?
- How do I get support for the APIs?
- Rate Limiting
Get Started
Authentication
GoToConnect
GoToWebinar
GoToMyPC
Central
Rescue
SDKs
References