Website: update receive-from-zoom webhook (#30395)

Changes:
- Updated the receive-from-zoom webhook to properly encode Zoom
conversation IDs in API requests to Zoom.
This commit is contained in:
Eric
2025-06-27 14:04:59 -05:00
committed by GitHub
parent 1b20c5bae6
commit 3aced14399
+3 -3
View File
@@ -85,7 +85,7 @@ module.exports = {
let idOfCallToGenerateTranscriptFor = payload.object.conversation_id;
let informationAboutThisCall = await sails.helpers.http.get.with({
url: `https://api.zoom.us/v2/zra/conversations/${idOfCallToGenerateTranscriptFor}`,
url: `https://api.zoom.us/v2/zra/conversations/${encodeURIComponent(idOfCallToGenerateTranscriptFor)}`,
headers: {
'Authorization': `Bearer ${token}`
}
@@ -100,7 +100,7 @@ module.exports = {
// Get a transcript of the call.
let callTranscript = await sails.helpers.http.get.with({
url: `https://api.zoom.us/v2/zra/conversations/${idOfCallToGenerateTranscriptFor}/interactions?page_size=300`,
url: `https://api.zoom.us/v2/zra/conversations/${encodeURIComponent(idOfCallToGenerateTranscriptFor)}/interactions?page_size=300`,
headers: {
'Authorization': `Bearer ${token}`
}
@@ -119,7 +119,7 @@ module.exports = {
if(tokenForNextPageOfResults) {
await sails.helpers.flow.until(async()=>{
let thisPageOfCallInformation = await sails.helpers.http.get.with({
url: `https://api.zoom.us/v2/zra/conversations/${idOfCallToGenerateTranscriptFor}/interactions?next_page_token=${tokenForNextPageOfResults}`,
url: `https://api.zoom.us/v2/zra/conversations/${encodeURIComponent(idOfCallToGenerateTranscriptFor)}/interactions?next_page_token=${encodeURIComponent(tokenForNextPageOfResults)}`,
headers: {
'Authorization': `Bearer ${token}`
}