2021年3月17日 星期三

zoom 學習筆記

預設姓名 (免除進入會議時還要手動輸入姓名)
會議連結帶入參數 : &uname=姜大弘%20(弘弘)

LINE強制用外部瀏覽器開啟會議連結 (iphone尚未安裝zoom app 才能正確跳轉到下載頁面)
會議連結帶入參數 : &openExternalBrowser=1

事件處理 : 進入會議室自動呼叫網址
一、設定 webhook
1. 登入 app maketplace https://marketplace.zoom.us/
2. 下拉選單選擇 build app
3. Webhook Only > create
4. Feature > Event Subscriptions > 新增
Event notification endpoint URL : 輸入要呼叫的網址
Event types : 新增 meeting > Participant/Host joined meeting
二、呼叫網址端程式寫法
if (Request.Headers["authorization"] != [對應 feature 的 Verification Token]) return; // 確認來源合法
      string documentContents = ""; // request body
      using (Stream receiveStream = Request.InputStream)
        using (StreamReader readStream = new StreamReader(receiveStream, System.Text.Encoding.UTF8))
          documentContents = readStream.ReadToEnd();
      var json = JsonConvert.DeserializeObject<Newtonsoft.Json.Linq.JObject>(documentContents);
      var name = json.Value<Newtonsoft.Json.Linq.JObject>("payload").Value<Newtonsoft.Json.Linq.JObject>("object").Value<Newtonsoft.Json.Linq.JObject>("participant").Value<string>("user_name"); // 進入會議室的姓名
      var 會議id = json.Value<Newtonsoft.Json.Linq.JObject>("payload").Value<Newtonsoft.Json.Linq.JObject>("object").Value<string>("id");


沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...