1

我们有一个应用程序目前不在 Zoom 的公共市场中,但我们使用它在我们的平台上导入客户的 Zoom 会议记录。从 Zoom api 正常获取视频工作正常,但是当我们尝试导入有密码的视频时,我们可以download_url通过点击<meetings/{meetingId}/recordings>终点到达,但是当我们使用授权点击下载 url 时(outh ) 令牌,我们得到 Forbidden 响应。

该文档仅在https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/recordingget上说使用 JWT 令牌下载录音,但是如果我们有 Oauth 应用程序,我们将如何继续?

4

2 回答 2

1

正如暗光所指出的,你不能使用 oauth 来下载文件......但你可以使用 jwt 和它有点简单......

#pre-reqs, PSZoom powershell module, an admin account on zoom, your oauth set and your JWT Auth set.
#update this to match your environment - you will need a JWT token, and they expire regularly, 
#you will need your from and to dates, your download location, 
#and to choose if you want auto delete (change no to yes AND uncomment the remove section on line 38
#autodelete is untested, be careful
import-module PSZoom
$Global:ZoomApiKey    = 'YOUR API KEY'  
$Global:ZoomApiSecret = 'YOUR API SECRET'
$base = "C:\working\Testing\"
$fromfile1 = "C:\working\zoomusers_$((Get-Date).ToString('MM-dd-yyyy')).csv"
$fromfile2 = "c:\working\rcdngs_$((Get-Date).ToString('MM-dd-yyyy')).csv"
$fromfile3 = "c:\working\DWNLD_$((Get-Date).ToString('MM-dd-yyyy')).csv"
$downlog = "c:\working\ZoomDownloads_$((Get-Date).ToString('MM-dd-yyyy')).log"
$deletelog = "c:\working\ZoomDelete_$((Get-Date).ToString('MM-dd-yyyy')).log"
$exportPath = 'c:\working\files\'
$Users = Import-Csv -Path $FromFile1
$MIDS = Import-Csv -Path $fromfile2
$Links = Import-Csv -Path $fromfile3
$jwt='YOUR VERY LONG JWT TOKEN'
$AToken='/?access_token='
$autodelete= 'NO'
Get-ZoomUsers -AllPages -status active | Where-Object {$_.type -eq "2"} |select id,first_name,last_name,email,pmi | export-csv $fromfile1 -NoTypeInformation
foreach ($user in $Users) {
Get-zoomRecordings -userId $user.email -From 2021-09-20 -PageSize 300 -To 2021-09-24 |select -ExpandProperty meetings| export-csv $fromfile2 -NoTypeInformation 
foreach ($MID in $MIDS) {
Get-ZoomMeetingRecordings -MeetingId $MID.uuid | select -property topic,start_time -ExpandProperty recording_files| select -property topic,start_time,meeting_id,download_url| export-csv $fromfile3 -Append -NoTypeInformation}
}
foreach ($Link in $Links) {
$MTD = $Link.start_time.substring(0,10)
$path = ($base + $Link.topic)
If(!(test-path $path))
{
      New-Item -ItemType Directory -Force -Path $path
}
$uri= ($link.download_url + $AToken + $jwt)
$inc = 1
$file=($path + "\" + $mtd + "-" + $inc + ".mp4")
If(!(test-path $file)) {
$wc=New-Object System.Net.WebClient
$wc.DownloadFile($uri,$file)  
echo "downloading $file" | out-file $downlog -append}
else {
$inc=$inc+1
$file=($path + "\" + $mtd + "-" + $inc + ".mp4")
$wc=New-Object System.Net.WebClient
$wc.DownloadFile($uri,$file)  
echo "downloading $file" | out-file $downlog -append}

if($autodelete -eq 'YES'){
    #Remove-ZoomMeetingRecordings -MeetingId $link.meeting_id -Action delete
    echo ($link.topic + " on " + $MTD + " was succesfully delted on $((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss'))") | out-file $deletelog -append
    }
}
于 2021-10-19T17:47:15.257 回答
0

所以我在 Zoom 讨论中发现了这个问题,目前截至 2020 年 4 月 22 日,这是不可能的。到目前为止,您可能需要为此使用通知功能 - https://devforum.zoom.us/t/best-way-to-download-recording-files-programmatically/7386/20

于 2020-04-22T11:46:19.017 回答