Android / Zoom API / Get sharing/recording details
Back to Collection Items
// Important: Don't forget to include the call to System.loadLibrary
// as shown at the bottom of this code sample.
package com.test;
import android.app.Activity;
import com.chilkatsoft.*;
import android.widget.TextView;
import android.os.Bundle;
public class SimpleActivity extends Activity {
private static final String TAG = "Chilkat";
// Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http = new CkHttp();
boolean success;
CkJsonObject queryParams = new CkJsonObject();
queryParams.UpdateString("type","live");
queryParams.UpdateInt("page_size",30);
queryParams.UpdateString("next_page_token","quis officia in reprehenderit");
// Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>");
CkHttpResponse resp = http.QuickRequestParams("GET","https://api.zoom.us/v2/metrics/webinars/:webinarId/participants/sharing",queryParams);
if (http.get_LastMethodSuccess() == false) {
Log.i(TAG, http.lastErrorText());
return;
}
CkStringBuilder sbResponseBody = new CkStringBuilder();
resp.GetBodySb(sbResponseBody);
CkJsonObject jResp = new CkJsonObject();
jResp.LoadSb(sbResponseBody);
jResp.put_EmitCompact(false);
Log.i(TAG, "Response Body:");
Log.i(TAG, jResp.emit());
int respStatusCode = resp.get_StatusCode();
Log.i(TAG, "Response Status Code = " + String.valueOf(respStatusCode));
if (respStatusCode >= 400) {
Log.i(TAG, "Response Header:");
Log.i(TAG, resp.header());
Log.i(TAG, "Failed.");
return;
}
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "page_count": "integer",
// "page_size": "integer",
// "total_records": "integer",
// "next_page_token": "string",
// "participants": [
// {
// "id": "string",
// "user_id": "string",
// "user_name": "string",
// "details": [
// {
// "content": "string",
// "start_time": "string",
// "end_time": "string"
// }
// ]
// }
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
String id;
String user_id;
String user_name;
int j;
int count_j;
String content;
String start_time;
String end_time;
String page_count = jResp.stringOf("page_count");
String page_size = jResp.stringOf("page_size");
String total_records = jResp.stringOf("total_records");
String next_page_token = jResp.stringOf("next_page_token");
int i = 0;
int count_i = jResp.SizeOfArray("participants");
while (i < count_i) {
jResp.put_I(i);
id = jResp.stringOf("participants[i].id");
user_id = jResp.stringOf("participants[i].user_id");
user_name = jResp.stringOf("participants[i].user_name");
j = 0;
count_j = jResp.SizeOfArray("participants[i].details");
while (j < count_j) {
jResp.put_J(j);
content = jResp.stringOf("participants[i].details[j].content");
start_time = jResp.stringOf("participants[i].details[j].start_time");
end_time = jResp.stringOf("participants[i].details[j].end_time");
j = j + 1;
}
i = i + 1;
}
}
static {
System.loadLibrary("chilkat");
// Note: If the incorrect library name is passed to System.loadLibrary,
// then you will see the following error message at application startup:
//"The application <your-application-name> has stopped unexpectedly. Please try again."
}
}
Curl Command
curl -G -d "type=live"
-d "page_size=30"
-d "next_page_token=quis%20officia%20in%20reprehenderit"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/metrics/webinars/:webinarId/participants/sharing
Postman Collection Item JSON
{
"name": "Get sharing/recording details",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/sharing?type=live&page_size=30&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"webinars",
":webinarId",
"participants",
"sharing"
],
"query": [
{
"key": "type",
"value": "live",
"description": "The type of webinar to query: \n* `past` — All past webinars. \n* `live` - All live webinars. \n\nThis value defaults to `live`."
},
{
"key": "page_size",
"value": "30",
"description": "The number of records returned within a single API call."
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit",
"description": "The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceed the current page size. The expiration period for this token is 15 minutes."
}
],
"variable": [
{
"key": "webinarId",
"value": "quis officia in reprehenderit",
"description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
}
]
},
"description": "Retrieve the sharing and recording details of participants from live or past webinars. <br><br>\n**Scopes:** `dashboard_webinars:read:admin`<br>\n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy` <br>\n**Prerequisites:**<br>\n* Business, Education or API Plan with Webinar add-on.\n\n"
},
"response": [
{
"name": "**HTTP Status Code:** `200`<br>\nWebinar participants returned.<br>\nOnly available for paid accounts that have enabled the Dashboard feature.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/sharing?type=live&page_size=30&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"webinars",
":webinarId",
"participants",
"sharing"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "30"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "webinarId",
"value": "quis officia in reprehenderit",
"description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"page_count\": \"integer\",\n \"page_size\": \"integer\",\n \"total_records\": \"integer\",\n \"next_page_token\": \"string\",\n \"participants\": [\n {\n \"id\": \"string\",\n \"user_id\": \"string\",\n \"user_name\": \"string\",\n \"details\": [\n {\n \"content\": \"string\",\n \"start_time\": \"string\",\n \"end_time\": \"string\"\n }\n ]\n }\n ]\n}"
},
{
"name": "**Error Code:** `300`<br>\nCan not access webinar info, {webinarId}.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/sharing?type=live&page_size=30&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"webinars",
":webinarId",
"participants",
"sharing"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "30"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "webinarId",
"value": "quis officia in reprehenderit",
"description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
}
]
}
},
"status": "Multiple Choices",
"code": 300,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `3001`<br>\nThis webinar's detail info is not available or ID is not valid.<br>\nThis webinar has not ended yet.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/sharing?type=live&page_size=30&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"webinars",
":webinarId",
"participants",
"sharing"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "30"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "webinarId",
"value": "quis officia in reprehenderit",
"description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}