Setting the file. One moment.
Skill 128 · Build Zoom Phone Integration
Subchapter 128.9
examples/phone-api-service-pattern.mdMarkdown1 KBView on GitHub
References
Call Handling PatternsAlso bundled
Architecture And Lifecycleexport async function getCallHistory(accessToken, from, to) {
const qs = new URLSearchParams({ from, to }).toString();
const res = await fetch(`https://api.zoom.us/v2/phone/call_history?${qs}`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!res.ok) throw new Error(`call_history failed: ${res.status}`);
const data = await res.json();
// Normalize v2/v3 style for downstream code.
return (data.call_history || data.call_logs || []).map((row) => ({
callHistoryUuid: row.call_history_uuid || row.id,
callId: row.call_id,
raw: row,
}));
}
export async function getCallElement(accessToken, callElementId) {
const res = await fetch(`https://api.zoom.us/v2/phone/call_element/${callElementId}`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!res.ok) throw new Error(`call_element failed: ${res.status}`);
return res.json();
}call_logs, call_path) are encountered.