Created
October 13, 2025 20:38
-
-
Save broguinn/354e5c9130921aab39d2617a00616a30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as dotenv from 'dotenv'; | |
| import { createZoomClient } from '@src/lib/clients/zoom'; | |
| dotenv.config(); | |
| async function run() { | |
| const zoom = createZoomClient(); | |
| const userId = 'QlnQyO41TqycR_whw8ggJQ'; | |
| console.log('Creating Zoom client...'); | |
| // Test user endpoint | |
| try { | |
| console.log('\n=== Fetching user ==='); | |
| const user = await zoom.getUser(userId); | |
| console.log(JSON.stringify(user, null, 2)); | |
| } catch (error) { | |
| console.error('Failed to fetch user:', error.response?.data || error.message); | |
| } | |
| // Test call history endpoint - fetch recent calls | |
| try { | |
| console.log('\n=== Fetching recent call history ==='); | |
| const history = await zoom.getCallHistory({ page_size: 5 }); | |
| console.log(JSON.stringify(history, null, 2)); | |
| // If we have calls, try fetching details for the first one | |
| if (history.call_logs && history.call_logs.length > 0) { | |
| const firstCallId = history.call_logs[0].id; | |
| console.log(`\n=== Testing with completed call ID: ${firstCallId} ===`); | |
| try { | |
| console.log('\n=== Fetching call path ==='); | |
| const callPath = await zoom.getCallPath(firstCallId); | |
| console.log(JSON.stringify(callPath, null, 2)); | |
| } catch (error) { | |
| console.error('Failed to fetch call path:', error.response?.data || error.message); | |
| } | |
| try { | |
| console.log('\n=== Fetching call history detail ==='); | |
| const callDetail = await zoom.getCallHistoryDetail(firstCallId); | |
| console.log(JSON.stringify(callDetail, null, 2)); | |
| } catch (error) { | |
| console.error('Failed to fetch call history detail:', error.response?.data || error.message); | |
| } | |
| } | |
| } catch (error) { | |
| console.error('Failed to fetch call history:', error.response?.data || error.message); | |
| } | |
| } | |
| run().then(() => process.exit(0)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment