How to create, update and delete account users via Admin API
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 term account in this guide instead of organization - the concept stays the same.
Also, you should be aware that any user modification performed via the Admin API to your account is automatically reflected to your pbx (organization).
Create Users of an Account
You can use the Add Users
operation available in the Admin API to create users of an account. Here we assume that the given token is the one of the super admins.
Required request parameters for this operation are:
accountKey
: The account key. If no value is provided, it uses the admin's default account key.users
: An array of objects that holds the users to be added to the account.
Request Payload
This is a sample request payload that shows some attributes available in a User
record.
{
"users": [
{
"email": "jtianno@company.com",
"firstName": "Janco",
"lastName": "Tianno"
}
],
"suppressEmail": true
}
suppressEmail
controls whether a welcome email is sent. The email invites the user to setup their login credentials and notifies them of access to the account. If you would like to prevent the user from being notified about being added to the LogMeIn account you may set "suppressEmail":true
in the request.
cURL Example
curl -X POST \
'https://api.getgo.com/admin/rest/v1/accounts/{accountKey}/users' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
-d '{"users":[{"email":"jtianno@company.com","firstName":"Janco","lastName":"Tianno"}]}'
Successful Response Example
Response payload contains a list of records with attributes userKey
and email
.
Existing (conflicting) users are returned in the response payload as well.
[
{
"key": 78888886011013972886849029,
"email": "jtianno@company.com"
}
]
Errors
Validation errors are returned as HTTP 400 - Request validation errors
as exhibited in the following sample.
{
"code": "user.timezone.invalid",
"field": "users[n].timeZone"
}
Update Users of an Account
You can use the Update User
operation available in the Admin API to update a user of an account. Here we assume that the given token is the one of the super admins.
Required request parameters for this operation are:
accountKey
: The account key. If no value is provided, it uses the admin's default account key.userKey
: The user key. Expected to be an integer value.
Request Payload
This is a sample request payload that shows some attributes that can be modified in a User
record.
{
"email": "jtianno@company.com",
"firstName": "Janco",
"lastName": "Tianno"
}
cURL Example
curl -X PUT \
'https://api.getgo.com/admin/rest/v1/accounts/{accountKey}/users/{userKey}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
-d '{"email":"jtianno@company.com","firstName":"Janco","lastName":"Tianno"}'
It is expected that an HTTP 204 No Content
is returned as a successful response.
Delete Users of an Account
You can use the Delete User
operation available in the Admin API to remove a list of users of an account. Here we assume that the given token is the one of the super admins.
Required request parameters for this operation are:
accountKey
: The account key. If no value is provided, it uses the admin's default account key.userKeys
: The user keys. Expected to be an array of integer values. Can be provided as a comma separated string.
Note that the user will only be removed from the account. User credentials to login will still work, they will just not have access to the given account.
cURL Example
curl -X DELETE \
'https://api.getgo.com/admin/rest/v1/accounts/{accountKey}/users/{userKeys}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json'
It is expected that an HTTP 204 No Content
is returned as a successful response.
- 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