Does Webhook response data is invalid after respond to Zoom?
I try to download recording files when I get recording.completed
event by Zoom Webhook and I use the download_token
and download_url
for a specific recording file.
However, when I try to download the same file after few days, it raises Forbidden Error
. Thus, I assume that there is validation time to use the download_token
, and try to get file with REST API, POST /meetings/{meeting_id}/recordings
.
Did I miss something, or is it right that there is limited time or validation to use download_token
in Webhook response?
The below one is a sample Webhook response.
{
"event": "recording.completed",
"payload": {
"account_id": "",
"object": {
"recording_files":[
{
"file_type":"M4A",
"file_extension":"M4A",
"download_url":"https://example.zoom.us/rec/webhook_download/...",
"status":"completed",
"recording_type":"audio_only"
}
],
}
},
"download_token": "DOWNLOAD_TOKEN"
}
The below on is a sample source code in Python3.11 to download a recording file with a download_url
and download_token
.
import requests
target_url = download_url + f"?access_token={download_token}"
binary_file = requests.get(url=target_url).content