### GET /organizers/{organizerKey}/trainings/{trainingKey}/startUrl Source: https://developer.goto.com/GoToTrainingV1 Retrieves a URL that can be used to start a training. When this URL is opened in a web browser, the GoTo Training client will be downloaded and launched and the training will start after the organizer logs in with its credentials. ```APIDOC ## GET /organizers/{organizerKey}/trainings/{trainingKey}/startUrl ### Description Retrieves a URL that can be used to start a training. When this URL is opened in a web browser, the GoTo Training client will be downloaded and launched and the training will start after the organizer logs in with its credentials. ### Method GET ### Endpoint /organizers/{organizerKey}/trainings/{trainingKey}/startUrl ### Parameters #### Path Parameters - **organizerKey** (integer) - Required - The key of the training organizer. - **trainingKey** (integer) - Required - The key of the training. ### Response #### Success Response (200) - **URL to start the training** (string) - URL to start the training. #### Response Example ```json "string" ``` ``` -------------------------------- ### Start Training - Node.js (Axios) Source: https://developer.goto.com/GoToTrainingV1 Retrieves a URL to start a training session. This Node.js example uses Axios to send a GET request to the API. Ensure you replace `REPLACE_BEARER_TOKEN` with a valid token. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2T/rest/trainings/%7BtrainingKey%7D/start', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Install Node.js Dependencies Source: https://developer.goto.com/guides/GoToConnect/11_Screen_Pop Installs Node.js dependencies required for the project. This command should be run once before starting the application. ```bash npm install ``` -------------------------------- ### Start Meeting Request Sample (Node.js + Axios) Source: https://developer.goto.com/GoToMeetingV1 This snippet demonstrates how to start a meeting using the GoTo API with Node.js and the Axios library. It requires a bearer token for authorization and sends a GET request to the start meeting endpoint. The response data is logged to the console, and any errors are caught and logged. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2M/rest/meetings/%7BmeetingId%7D/start', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Get Training Start URL Request Samples (Node.js, Shell, Python, PHP, Ruby) Source: https://developer.goto.com/GoToTrainingV1 Demonstrates how to retrieve a URL that can be used to start a training session. This URL, when opened in a browser, will prompt the user to download and launch the GoTo Training client. Samples are provided for Node.js with Axios, Shell with Curl, Python with Python3, PHP with Http2, and Ruby with native HTTP client. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2T/rest/organizers/%7BorganizerKey%7D/trainings/%7BtrainingKey%7D/startUrl', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` ```shell curl -X GET \ 'https://api.getgo.com/G2T/rest/organizers/%7BorganizerKey%7D/trainings/%7BtrainingKey%7D/startUrl' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` ```python import requests url = "https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/startUrl" headers = { 'Authorization': 'Bearer REPLACE_BEARER_TOKEN' } response = requests.get(url, headers=headers) print(response.text) ``` ```php "https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/startUrl", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer REPLACE_BEARER_TOKEN" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:"; } else { echo $response; } ``` ```ruby require 'net/http' require 'uri' uri = URI.parse("https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/startUrl") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer REPLACE_BEARER_TOKEN" response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### GET /webinars/{webinarKey}/startUrl Source: https://developer.goto.com/GoToWebinarV2 Retrieves a URL that can be used to start a webinar. This URL, when opened in a browser, will prompt the GoTo Webinar client to launch and start the webinar after organizer login. ```APIDOC ## GET /webinars/{webinarKey}/startUrl ### Description Retrieves a URL that can be used to start a webinar. This URL, when opened in a browser, will prompt the GoTo Webinar client to launch and start the webinar after organizer login. ### Method GET ### Endpoint /webinars/{webinarKey}/startUrl ### Parameters #### Path Parameters - **webinarKey** (integer ) - Required - The key of the webinar. ### Request Example ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2W/rest/v2/webinars/%7BwebinarKey%7D/startUrl', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` ### Response #### Success Response (200) - **startUrl** (string) - The URL that can be used to start a webinar. #### Response Example ```json { "startUrl": "string" } ``` ``` -------------------------------- ### Successful Response Example for Webhooks Source: https://developer.goto.com/guides/GoToWebinar/08_HOW_webhooks This example demonstrates a successful HTTP 200 OK response from a webhook, including embedded user subscription details. It shows the structure of the data returned when a subscription event occurs. ```json 200 OK { "_embedded": { "userSubscriptions": [ { "webhookKey": "dff781bc-fake-4361-81ff-d5e9861fb0e1", "callbackUrl": "https://enih2xxhnu6.x.pipedream.net/", "userSubscriptionState": "ACTIVE", "activationState": "ACTIVE", "userSubscriptionKey": "8e33dfee-c7b3-4f67-96ac-e3fakeb54f3f", "eventName": "registrant.added", "product": "g2w", "eventVersion": "1.0.0", "createTime": "2019-03-14T18:18:45.442Z" } ] } } ``` -------------------------------- ### Start Training - Node.js (Axios) Source: https://developer.goto.com/GoToTrainingV1 Initiates a training session by providing a URL that launches the GoTo Training client. This sample uses Node.js with the Axios library to make the GET request. It requires a bearer token for authorization. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2T/rest/organizers/%7BorganizerKey%7D/trainings/%7BtrainingKey%7D/startUrl', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### API Request Example (JSON) Source: https://developer.goto.com/support An example of a GET request to the GoToMeeting API to retrieve meeting details. It includes the request URL, headers, and expected response body format. This helps developers understand the structure of API interactions. ```json { "createTime" : "", "passwordRequired" : "false", "status" : "“, "subject" : "Test Meeting", "endTime" : "2013-05-11T10:00:00.+0000", "conferenceCallInfo" : "AT: +43 (0) 7 2088 2172\nDE: +49 (0) 811 8899 6929\nUS: +1 (626) 521-0016\nGB: +44 (0) 203 657 6779\nDE: 0 800 723 5120\nUS: 1 877 739 5902\nFR: +33 (0) 170 950 589\nAccess Code: 348-565-853", "startTime" : "2013-05-11T09:00:00.+0000", "duration" : 60, "maxParticipants" : 26, "meetingId" : 123456789, "meetingKey" : 123456789, "meetingType" : "scheduled", "uniqueMeetingId" : 123456789 } ``` -------------------------------- ### Get Webinar Start URL (Node.js, Shell, Python, PHP, Ruby) Source: https://developer.goto.com/GoToWebinarV2 Retrieves a URL to start a webinar. This URL, when opened in a browser, will download and launch the GoTo Webinar client for the organizer. Requires the webinar key. Supported by Node.js (Axios), Shell (Curl), Python, PHP, and Ruby. ```Node.js var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2W/rest/v2/webinars/%7BwebinarKey%7D/startUrl', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` ```Shell curl -X GET \ 'https://api.getgo.com/G2W/rest/v2/webinars/{webinarKey}/startUrl' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` ```Python import requests url = "https://api.getgo.com/G2W/rest/v2/webinars/{webinarKey}/startUrl" headers = { 'Authorization': 'Bearer REPLACE_BEARER_TOKEN' } response = requests.get(url, headers=headers) print(response.json()) ``` ```PHP "https://api.getgo.com/G2W/rest/v2/webinars/{webinarKey}/startUrl", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer REPLACE_BEARER_TOKEN" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:"; echo $err; } else { echo $response; } ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.getgo.com/G2W/rest/v2/webinars/%7BwebinarKey%7D/startUrl') request = Net::HTTP::Get.new(uri) request['Authorization'] = 'Bearer REPLACE_BEARER_TOKEN' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### Callback Event Example with Headers and Body Source: https://developer.goto.com/guides/GoToWebinar/08_HOW_webhooks This example illustrates a typical webhook callback event, including the necessary HTTP headers for signature verification and the JSON payload of the event itself. It's crucial for understanding the data structure received by your application. ```http Headers : Accept: application/json, application/*+json Content-Type: application/json X-Webhook-SecretKey-Id: 1 X-Webhook-Signature: OfpnJDFpdMKYS8tM8q7RxT/ynw5HDenv4NdU+vEtoGo= X-Webhook-Signature-Timestamp: 1554356824634 X-Webhook-Signature-Version: 0 Content-Length: 468 Body : { "eventName":"registrant.joined", "eventVersion":"1.0.0", "product":"g2w", "eventKey":"74d38461-9db8-4e41-8f59-d99f00b82411", "sessionKey":15887209, "webinarKey":5620084814059709442, "firstName":"Abhinav", "lastName":"Gandhi", "email":"a@g.com", "timestamp":"2019-04-04T05:47:04.517Z", "webinarCreatorKey":710161738256079372, "webinarTitle":"New Webinar!!", "experienceType":"CLASSIC", "recurrenceType":"single_session", "registrantKey":8325357307900339981, "joinTime":1554356793898 } ``` -------------------------------- ### Fetch Portals (Shell + Curl) Source: https://developer.goto.com/g2a-c This example illustrates how to fetch portal data using the `curl` command-line tool. It sends a GET request to the /portals endpoint, including necessary headers like Authorization. Replace placeholders with actual values. ```shell curl -X GET \ 'https://api.getgo.com/G2AC/rest/v1/portals?filter=SOME_STRING_VALUE&attributeNames=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Get Webinar Recording Assets using Shell with Curl Source: https://developer.goto.com/GoToWebinarV2 Retrieves all recording assets for a given webinar key using a cURL command. This example demonstrates how to set the request method, URL, headers (including authorization), and query parameters for pagination. The response includes details about the recording assets. ```bash curl --request GET 'https://api.getgo.com/G2W/rest/v2/webinars/{webinarKey}/recordingAssets?page={page}&size={size}' \ --header 'Authorization: Bearer {ACCESS_TOKEN}' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Start Demo Application Source: https://developer.goto.com/guides/GoToConnect/11_Screen_Pop Starts the demo application. Press Ctrl-C in the terminal to exit. ```bash npm start ``` -------------------------------- ### Migrate GET API Call Host (cURL) Source: https://developer.goto.com/guides/GoToConnect/GTC_Host_Migration This example demonstrates how to update a cURL GET request to use the new GoTo Connect API host. It shows the replacement of 'api.jive.com' with 'api.goto.com' in the URL. No other changes are required for this specific call. ```cURL curl --request GET \ --url 'https://api.jive.com/voice-admin/v1/extensions?accountKey=SOME_INTEGER_VALUE' \ --header 'authorization: Bearer ACCESS_TOKEN' ``` ```cURL curl --request GET \ --url 'https://api.goto.com/voice-admin/v1/extensions?accountKey=SOME_INTEGER_VALUE' \ --header 'authorization: Bearer ACCESS_TOKEN' ``` -------------------------------- ### Python Example for Creating a Webinar Source: https://developer.goto.com/GoToWebinarV2 Example using Python's 'requests' library to create a webinar. It shows how to construct the request payload and send a POST request to the API. ```python import requests import json url = "https://api.getgo.com/G2W/rest/v2/webinars" headers = { "Content-Type": "application/json", "Authorization": "Bearer YOUR_ACCESS_TOKEN" } webinar_data = { "subject": "My Webinar", "description": "A detailed description of the webinar.", "times": [ { "startTime": "2024-03-15T10:00:00Z", "endTime": "2024-03-15T11:00:00Z" } ], "timeZone": "America/New_York", "locale": "en_US" } response = requests.post(url, headers=headers, data=json.dumps(webinar_data)) if response.status_code == 201: print("Webinar created successfully:", response.json()) else: print("Error creating webinar:", response.status_code, response.text) ``` -------------------------------- ### GET /G2M/rest/meetings/{meetingId}/start Source: https://developer.goto.com/GoToMeetingV1 Returns a host URL to start a meeting. ```APIDOC ## GET /G2M/rest/meetings/{meetingId}/start ### Description Returns a host URL that can be used to start a meeting. Opening this URL in a web browser will launch the GoTo Meeting client and start the meeting without requiring user login. ### Method GET ### Endpoint https://api.getgo.com/G2M/rest/meetings/{meetingId}/start ### Parameters #### Path Parameters - **meetingId** (integer ) - Required - The meeting ID. ### Responses #### Success Response (200) - **hostURL** (string) - The host URL to start the meeting. #### Error Responses - **400** Bad Request - **403** Forbidden - **406** Not Acceptable ``` -------------------------------- ### PHP Example for Creating a Webinar Source: https://developer.goto.com/GoToWebinarV2 Example using PHP with cURL to create a webinar. This script demonstrates setting up the request, including headers and the JSON payload, for the webinar creation API endpoint. ```php 'My Webinar', 'description' => 'A detailed description of the webinar.', 'times' => [ [ 'startTime' => '2024-03-15T10:00:00Z', 'endTime' => '2024-03-15T11:00:00Z' ] ], 'timeZone' => 'America/New_York', 'locale' => 'en_US' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($webinarData)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer ' . $accessToken ]); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Curl error: ' . curl_error($ch); } else { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode == 201) { echo 'Webinar created successfully: ' . $response; } else { echo 'Error creating webinar. HTTP Code: ' . $httpCode . ' Response: ' . $response; } } curl_close($ch); ?> ``` -------------------------------- ### Ruby Example for Creating a Webinar Source: https://developer.goto.com/GoToWebinarV2 Example using Ruby's native Net::HTTP library to create a webinar. This code snippet shows how to construct the HTTP request, including headers and the JSON body. ```ruby require 'net/http' require 'uri' require 'json' uri = URI.parse('https://api.getgo.com/G2W/rest/v2/webinars') access_token = 'YOUR_ACCESS_TOKEN' webinar_data = { subject: 'My Webinar', description: 'A detailed description of the webinar.', times: [ { startTime: '2024-03-15T10:00:00Z', endTime: '2024-03-15T11:00:00Z' } ], timeZone: 'America/New_York', locale: 'en_US' } http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri.request_uri) request['Content-Type'] = 'application/json' request['Authorization'] = "Bearer #{access_token}" request.body = webinar_data.to_json response = http.request(request) if response.code == '201' puts "Webinar created successfully: #{response.body}" else puts "Error creating webinar: Code #{response.code}, Body #{response.body}" end ``` -------------------------------- ### Event String Example for Signature Generation Source: https://developer.goto.com/guides/GoToWebinar/08_HOW_webhooks This example shows the exact string format required for generating the webhook signature. It concatenates the timestamp and the event JSON payload, separated by a colon. ```text 1554356824634:{"eventName":"registrant.joined","eventVersion":"1.0.0","product":"g2w","eventKey":"74d38461-9db8-4e41-8f59-d99f00b82411","sessionKey":15887209,"webinarKey":5620084814059709000,"firstName":"Abhinav","lastName":"Gandhi","email":"a@g.com","timestamp":"2019-04-04T05:47:04.517Z","webinarCreatorKey":710161738256079400,"webinarTitle":"New Webinar!!","experienceType":"CLASSIC","recurrenceType":"single_session","registrantKey":8325357307900340000,"joinTime":1554356793898} ``` -------------------------------- ### Query Webinars using Shell and Curl Source: https://developer.goto.com/GoToWebinarV2 This example shows how to query webinars using the `curl` command-line tool. It requires setting the appropriate headers, including authorization, and passing query parameters for time range, page, and size. Remember to replace placeholder values. ```bash curl -X GET \ 'https://api.getgo.com/G2W/rest/v2/organizers/{organizerKey}/webinars?fromTime=2020-03-13T10:00:00Z&toTime=2020-03-13T22:00:00Z&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Get Role Set (PHP + Http2) Source: https://developer.goto.com/admin Fetches a specific role set using PHP. This example demonstrates sending a GET request to the API endpoint, including the accountKey and roleSetId in the URL and optional query parameters. ```php ``` -------------------------------- ### Get Training Organizers Request Samples (Node.js, Shell, Python, PHP, Ruby) Source: https://developer.goto.com/GoToTrainingV1 Demonstrates how to retrieve a list of organizers for a specific training using different programming languages and tools. Includes Node.js with Axios, Shell with Curl, Python with Python3, PHP with Http2, and Ruby with native HTTP client. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/G2T/rest/organizers/%7BorganizerKey%7D/trainings/%7BtrainingKey%7D/organizers', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` ```shell curl -X GET \ 'https://api.getgo.com/G2T/rest/organizers/%7BorganizerKey%7D/trainings/%7BtrainingKey%7D/organizers' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` ```python import requests url = "https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/organizers" headers = { 'Authorization': 'Bearer REPLACE_BEARER_TOKEN' } response = requests.get(url, headers=headers) print(response.json()) ``` ```php "https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/organizers", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer REPLACE_BEARER_TOKEN" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:"; } else { echo $response; } ``` ```ruby require 'net/http' require 'uri' uri = URI.parse("https://api.getgo.com/G2T/rest/organizers/{organizerKey}/trainings/{trainingKey}/organizers") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer REPLACE_BEARER_TOKEN" response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### Start Training Source: https://developer.goto.com/GoToTrainingV1 Retrieves a URL to start a training session. This URL, when opened in a browser, will launch the GoTo Training client and start the training without requiring organizer login. ```APIDOC ## GET /trainings/{trainingKey}/start ### Description Returns a URL that can be used to start a training. When this URL is opened in a web browser, the GoTo Training client will be downloaded and launched and the training will start. A login of the organizer is not required. ### Method GET ### Endpoint https://api.getgo.com/G2T/rest/trainings/{trainingKey}/start ### Parameters #### Path Parameters - **trainingKey** (integer ) - Required - The key of the training. ### Request Example ``` { "example": "" } ``` ### Response #### Success Response (200) - **hostURL** (string) - The host URL that can be used to start a training. #### Response Example ```json { "hostURL": "string" } ``` ``` -------------------------------- ### Install Axios HTTP Client (Node.js) Source: https://developer.goto.com/guides/GoToConnect/12_Send_SMS Installs the Axios HTTP client, a popular JavaScript library used for making HTTP requests. This is a prerequisite for sending API requests in the Node.js application. ```bash npm install axios ``` -------------------------------- ### Start LiveLens Session with IdSrv2 Token Source: https://developer.goto.com/LiveLensReporting Example using cURL to start a new LiveLens session, authenticating with an IdSrv2 issued access token via the Authorization header. Requires the 'weblens;settings' scope. ```shell curl --location 'https://console.logmeinrescue.com/api/v2/session/LiveLens' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJhb...DUx-g' \ --data '{ "CustomerName": "Customer" }' ``` -------------------------------- ### Search Recording Assets (cURL) Source: https://developer.goto.com/GoToWebinarV2 This example shows how to search for completed recording assets using cURL. It demonstrates two variations: one with default parameters and another that includes `recordingShareUrl` and `webinarKey` by specifying the `includes` query parameter. Both require an access token and a JSON payload. ```bash curl --request PUT 'https://api.getgo.com/G2W/rest/v2/recordingassets/search?page={page}&size={size}' \ --header 'Authorization: Bearer {ACCESS_TOKEN}' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "accountKey": "123456", \ "sortField": "CREATETIME", \ "sortOrder": "DESC" \ }' ``` ```bash curl --request PUT 'https://api.getgo.com/G2W/rest/v2/recordingassets/search?page={page}&size={size}&includes=recordingShareUrl%2CwebinarKey' \ --header 'Authorization: Bearer {ACCESS_TOKEN}' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "accountKey": "123456", \ "sortField": "CREATETIME", \ "sortOrder": "DESC" \ }' ``` -------------------------------- ### Get Representative Portals using Shell and Curl Source: https://developer.goto.com/g2a-c This example shows how to retrieve portal information for a representative using Shell and Curl. It sends a GET request to the portals endpoint, including the representative's key and an authorization token. ```bash curl -X GET \ 'https://api.getgo.com/G2AC/rest/v1/representatives/{representativeKey}/portals' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Install GoTo .NET SDKs via NuGet Package Manager Console Source: https://developer.goto.com/guides/SDKs/03_NET-SDK Installs the GoTo Meeting, GoTo Webinar, GoTo Training, and GoTo Core SDKs along with their Json.NET dependency using the NuGet Package Manager Console in Visual Studio. These SDKs require .NET Framework 4.0 or higher. ```powershell PM> Install-Package LogMeIn.GoToMeeting.NET PM> Install-Package LogMeIn.GoToWebinar.NET PM> Install-Package LogMeIn.GoToTraining.NET PM> Install-Package LogMeIn.GoToCoreLib.NET ``` -------------------------------- ### Get Role Set (Node.js + Axios) Source: https://developer.goto.com/admin Retrieves a specific role set by its ID for a given account. This Node.js example uses Axios to send a GET request, optionally including query parameters like 'attributes'. Requires accountKey and roleSetId in the URL. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/admin/rest/v1/accounts/123/rolesets/%7BroleSetId%7D', params: {attributes: 'SOME_STRING_VALUE'}, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Node.js Axios Example for Creating a Webinar Source: https://developer.goto.com/GoToWebinarV2 Example using Node.js with the Axios library to send a POST request to create a webinar. This demonstrates how to structure the request with the JSON payload and headers. ```javascript const axios = require('axios'); const webinarData = { "subject": "My Webinar", "description": "A detailed description of the webinar.", "times": [ { "startTime": "2024-03-15T10:00:00Z", "endTime": "2024-03-15T11:00:00Z" } ], "timeZone": "America/New_York", "locale": "en_US" }; axios.post('https://api.getgo.com/G2W/rest/v2/webinars', webinarData, { headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' } }) .then(response => { console.log('Webinar created successfully:', response.data); }) .catch(error => { console.error('Error creating webinar:', error.response.data); }); ``` -------------------------------- ### Get Specific Template (Shell + Curl) Source: https://developer.goto.com/admin Retrieves a specific template using curl. Requires a bearer token for authorization. This is a command-line alternative to the Node.js example. ```bash curl -X GET \ 'https://api.getgo.com/admin/rest/v1/accounts/123/templates/%7BtemplateKey%7D' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Get Scheduled Meeting Reports (Shell + Curl) Source: https://developer.goto.com/admin Retrieves scheduled meeting reports using curl. Requires a bearer token for authorization. This is a command-line alternative to the Node.js example. ```bash curl -X GET \ 'https://api.getgo.com/admin/rest/v1/accounts/123/users/%7BuserKeys%7D/reports/meeting/scheduled?fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Minimal Spring Boot Application for GoToWebinar Source: https://developer.goto.com/guides/SDKs/02_Java-SDK An example of a minimal Spring Boot application that lists GoToWebinar scheduled for the next week. It handles OAuth2 token retrieval, calls the admin API to get the account key, and then lists webinars using the GoToWebinar SDK and GoTo Core library. Requires client ID and secret with appropriate scopes. ```java package com.example; import java.time.Instant; import java.util.*; import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpSession; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.view.RedirectView; import com.logmein.gotocorelib.api.common.*; import com.logmein.gotocorelib.api.OAuth2Api; import com.logmein.gotowebinar.api.WebinarsApi; @SpringBootApplication @RestController public class Main { static OAuth2Api oauth = new OAuth2Api("{provide client}", "{provide secret}"); static WebinarsApi webinars = new WebinarsApi(); static ApiInvoker admin = new ApiInvoker(); static Long getAccountKey(String accessToken) throws ApiException { // requires 'identity:' scope // ref: https://developer.goto.com/admin/#operation/Get%20Me var data = (Map) admin.deserialize( admin.invokeAPI("https://api.goto.com", "/admin/v1/me", "GET", Map.of(), null, Map.of("Authorization", "Bearer " + accessToken), null, null), "", HashMap.class); return Long.valueOf((String) data.get("accountKey")); } public static void main(String[] args) { SpringApplication.run(Main.class, args); } @GetMapping("/login") public RedirectView login( @RequestParam(value = "code", required = false) String code, HttpSession session) throws Exception { if (code == null || code.isEmpty()) { return new RedirectView(oauth.getOAuth2AuthorizationUrl()); } var tokens = oauth.getAccessTokenResponse(code); session.setAttribute("accessToken", tokens.getAccessToken()); return new RedirectView("/"); } @GetMapping("/") public ResponseEntity getMyWebinars(HttpSession session) throws Exception { var accessToken = session.getAttribute("accessToken"); if (accessToken == null) { return ResponseEntity.status(302) .location(java.net.URI.create("/login")) .build(); } var accountKey = getAccountKey((String) accessToken); var result = webinars.getWebinars((String) accessToken, accountKey, Date.from(Instant.now()), Date.from(Instant.now().plus(7, TimeUnit.DAYS.toChronoUnit())), 0L, 10L); return ResponseEntity.ok(result.getEmbedded().getWebinars()); } } ``` -------------------------------- ### Get Incidents with Shell and Curl Source: https://developer.goto.com/LogMeInResolve This example shows how to retrieve incidents using a cURL command in a shell environment. It constructs the URL with query parameters and includes the necessary Authorization header for authentication. ```shell curl -X GET \ 'https://api.goto.com/goto-resolve-ticketing/v1/incidents?serviceId=SOME_STRING_VALUE&keyword=SOME_STRING_VALUE&pageSize=SOME_INTEGER_VALUE&pageNumber=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&assignedTo=SOME_ARRAY_VALUE&requestedBy=SOME_ARRAY_VALUE&ticketType=SOME_STRING_VALUE&category=SOME_ARRAY_VALUE&priority=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&tag=SOME_ARRAY_VALUE&createdAtFrom=SOME_STRING_VALUE&createdAtTo=SOME_STRING_VALUE&dueDateFrom=SOME_STRING_VALUE&dueDateTo=SOME_STRING_VALUE&updatedAtFrom=SOME_STRING_VALUE&updatedAtTo=SOME_STRING_VALUE&include=SOME_ARRAY_VALUE&extraFields=SOME_ARRAY_VALUE' \ -H 'Authorization: Bearer REPLACE_BEARER_TOKEN' ``` -------------------------------- ### Request Sample: Get Users with Node.js and Axios Source: https://developer.goto.com/admin This snippet demonstrates how to fetch user data from the Developer GoTo API using Node.js and the Axios library. It includes setting up the request method, URL, query parameters, and authorization headers. Error handling is also included. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/admin/rest/v1/accounts/123/users', params: { attributes: 'SOME_STRING_VALUE', filter: 'SOME_STRING_VALUE', ascending: 'SOME_ARRAY_VALUE', offset: 'SOME_INTEGER_VALUE', pageSize: 'SOME_INTEGER_VALUE' }, headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Request Sample: Get Users with Ruby and Native HTTP Source: https://developer.goto.com/admin This snippet demonstrates fetching user data from the Developer GoTo API using Ruby's native `Net::HTTP` library. It covers constructing the request, setting headers, and handling the response. ```ruby require 'net/http' require 'uri' uri = URI.parse('https://api.getgo.com/admin/rest/v1/accounts/123/users') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri.request_uri) request['Authorization'] = 'Bearer REPLACE_BEARER_TOKEN' # Add query parameters request.set_form_data({ 'attributes' => 'SOME_STRING_VALUE', 'filter' => 'SOME_STRING_VALUE', 'ascending' => 'SOME_ARRAY_VALUE', 'offset' => 'SOME_INTEGER_VALUE', 'pageSize' => 'SOME_INTEGER_VALUE' }) response = http.request(request) puts response.body ``` -------------------------------- ### Get Group Request - Node.js with Axios Source: https://developer.goto.com/Scim Example of how to retrieve group details using Node.js and the Axios library. It demonstrates setting up the request options, including the HTTP method, URL, and authorization header. ```javascript var axios = require("axios").default; var options = { method: 'GET', url: 'https://api.getgo.com/identity/v1/Groups/%7BgroupKey%7D', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'} }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Create Webhook Request Samples Source: https://developer.goto.com/GoToWebinarV2 Samples for creating a new webhook. Requires a callback URL, event name, event version, and product. The callback URL must be HTTPS and respond with 200 OK to GET requests. ```json [ { "callbackUrl": "string", "eventName": "string", "eventVersion": "string", "product": "g2w" } ] ``` ```javascript var axios = require("axios").default; var config = { method: 'post', url: 'https://api.getgo.com/G2W/rest/v2/webhooks', headers: { 'Content-Type': 'application/json' }, data : [ { "callbackUrl": "string", "eventName": "string", "eventVersion": "string", "product": "g2w" } ] }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.error(error); }); ``` ```shell curl -X POST \ https://api.getgo.com/G2W/rest/v2/webhooks \ -H 'Content-Type: application/json' \ -d '[ { "callbackUrl": "string", "eventName": "string", "eventVersion": "string", "product": "g2w" } ]' ``` ```python import requests import json url = "https://api.getgo.com/G2W/rest/v2/webhooks" payload = [{ "callbackUrl": "string", "eventName": "string", "eventVersion": "string", "product": "g2w" }] headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=json.dumps(payload)) print(response.text) ``` ```php "string", "eventName" => "string", "eventVersion" => "string", "product" => "g2w" ] ]); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response = curl_exec($curl); curl_close($curl); echo $response; ?> ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.getgo.com/G2W/rest/v2/webhooks") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump([ { "callbackUrl": "string", "eventName": "string", "eventVersion": "string", "product": "g2w" } ]) response = http.request(request) puts response.read_body ``` -------------------------------- ### GET /organizers/{organizerKey}/webinars/{webinarKey}/meetingtimes Source: https://developer.goto.com/GoToWebinarV2 Retrieves the start and end times for a specific webinar's meeting intervals. This endpoint is useful for understanding scheduled availability or past meeting durations. ```APIDOC ## GET /organizers/{organizerKey}/webinars/{webinarKey}/meetingtimes ### Description Retrieves the start and end times for a specific webinar's meeting intervals. This endpoint is useful for understanding scheduled availability or past meeting durations. ### Method GET ### Endpoint /organizers/{organizerKey}/webinars/{webinarKey}/meetingtimes ### Parameters #### Path Parameters - **organizerKey** (string) - Required - The key of the organizer. - **webinarKey** (string) - Required - The key of the webinar. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **startTime** (string) - The starting time of an interval, e.g. 2020-03-13T10:00:00Z - **endTime** (string) - The ending time of an interval, e.g. 2020-03-13T22:00:00Z #### Response Example ```json [ { "startTime": "2019-08-24T14:15:22Z", "endTime": "2019-08-24T14:15:22Z" } ] ``` ```