Objective-C / Zoom API / Get telephone reports
Back to Collection Items
#import <CkoHttp.h>
#import <CkoJsonObject.h>
#import <CkoHttpResponse.h>
#import <CkoStringBuilder.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;
CkoJsonObject *queryParams = [[CkoJsonObject alloc] init];
[queryParams UpdateInt: @"type" value: [NSNumber numberWithInt: 1]];
[queryParams UpdateString: @"query_date_type" value: @"start_time"];
[queryParams UpdateString: @"from" value: @"1989-05-07"];
[queryParams UpdateString: @"to" value: @"1989-05-07"];
[queryParams UpdateInt: @"page_size" value: [NSNumber numberWithInt: 30]];
[queryParams UpdateInt: @"page_number" value: [NSNumber numberWithInt: 1]];
[queryParams UpdateString: @"next_page_token" value: @"quis officia in reprehenderit"];
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = @"<access_token>";
CkoHttpResponse *resp = [http QuickRequestParams: @"GET" url: @"https://api.zoom.us/v2/report/telephone" json: queryParams];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
CkoStringBuilder *sbResponseBody = [[CkoStringBuilder alloc] init];
[resp GetBodySb: sbResponseBody];
CkoJsonObject *jResp = [[CkoJsonObject alloc] init];
[jResp LoadSb: sbResponseBody];
jResp.EmitCompact = NO;
NSLog(@"%@",@"Response Body:");
NSLog(@"%@",[jResp Emit]);
int respStatusCode = [resp.StatusCode intValue];
NSLog(@"%@%d",@"Response Status Code = ",respStatusCode);
if (respStatusCode >= 400) {
NSLog(@"%@",@"Response Header:");
NSLog(@"%@",resp.Header);
NSLog(@"%@",@"Failed.");
return;
}
Curl Command
curl -G -d "type=1"
-d "query_date_type=start_time"
-d "from=1989-05-07"
-d "to=1989-05-07"
-d "page_size=30"
-d "page_number=1"
-d "next_page_token=quis%20officia%20in%20reprehenderit"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/telephone
Postman Collection Item JSON
{
"name": "Get telephone reports",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/report/telephone?type=1&query_date_type=start_time&from=1989-05-07&to=1989-05-07&page_size=30&page_number=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"report",
"telephone"
],
"query": [
{
"key": "type",
"value": "1",
"description": "Audio types:<br>`1` - Toll-free Call-in & Call-out.<br>`2` - Toll <br>\n`3` - SIP Connected Audio"
},
{
"key": "query_date_type",
"value": "start_time",
"description": "The type of date to query: \n* `start_time` — Query by call start time. \n* `end_time` — Query by call end time. \n* `meeting_start_time` — Query by meeting start time. \n* `meeting_end_time` — Query by meeting end time. \n\nThis value defaults to `start_time`."
},
{
"key": "from",
"value": "1989-05-07",
"description": "(Required) Start date in 'yyyy-mm-dd' format. The date range defined by the \"from\" and \"to\" parameters should only be one month as the report includes only one month worth of data at once."
},
{
"key": "to",
"value": "1989-05-07",
"description": "(Required) End date."
},
{
"key": "page_size",
"value": "30",
"description": "The number of records returned within a single API call."
},
{
"key": "page_number",
"value": "1",
"description": "The page number of the current page in the returned records. This field is **not** available if the `query_date_type` parameter is the `meeting_start_time` or `meeting_end_time` value. \n\n**DEPRECATED** — This field is deprecated and we will no longer support it in a future release. Instead, use the `next_page_token` query parameter for pagination."
},
{
"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 exceeds the current page size. The expiration period for this token is 15 minutes."
}
]
},
"description": "The [telephone report](https://support.zoom.us/hc/en-us/articles/206514816-Telephone-reports) allows you to view who dialed into meetings via phone (Audio Conferencing or SIP Connected Audio) and which number they dialed into and other details. Use this API to get telephone report for a specified period of time.\n\n**Scopes:** `report:read:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>**Prerequisites:**<br>\n* Pro or higher plan."
},
"response": [
{
"name": "**HTTP Status Code:** `200`<br>\nTelephone report returned.<br>\nThis is only available for paid account:{accountId}.<br>\nThe requested report cannot be generated for this account because this account has not subscribed to toll-free audio conference plan.<b",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/report/telephone?type=1&query_date_type=start_time&from=1989-05-07&to=1989-05-07&page_size=30&page_number=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"report",
"telephone"
],
"query": [
{
"key": "type",
"value": "1"
},
{
"key": "query_date_type",
"value": "start_time"
},
{
"key": "from",
"value": "1989-05-07"
},
{
"key": "to",
"value": "1989-05-07"
},
{
"key": "page_size",
"value": "30"
},
{
"key": "page_number",
"value": "1"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "\"{\\n \\\"from\\\": \\\"2019-06-20\\\",\\n \\\"to\\\": \\\"2019-07-20\\\",\\n \\\"page_count\\\": 1,\\n \\\"page_number\\\": 1,\\n \\\"page_size\\\": 30,\\n \\\"total_records\\\": 1,\\n \\\"telephony_usage\\\": [\\n {\\n \\\"meeting_id\\\": 00000,\\n \\\"phone_number\\\": \\\"000002001\\\",\\n \\\"host_name\\\": \\\"John Dev\\\",\\n \\\"host_email\\\": \\\"example@example.com\\\",\\n \\\"dept\\\": \\\"Billing\\\",\\n \\\"start_time\\\": \\\"2019-07-15T23:24:52Z\\\",\\n \\\"end_time\\\": \\\"2019-07-15T23:30:19Z\\\",\\n \\\"duration\\\": 6,\\n \\\"total\\\": 11,\\n \\\"country_name\\\": \\\"Macau SAR\\\",\\n \\\"meeting_type\\\": \\\"Meeting\\\",\\n \\\"call_in_number\\\": \\\"+85123456789\\\"\\n }\\n ]\\n}\""
}
]
}