• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

Example Webservice / API call- Connecting to Zoom & extracting info

For the the AutoHotkey Webinars we use Zoom which is a great, robust, inexpensive tool for hosting online meetings/webinars.  They have a free version which allows you to connect with people for up to 45 minutes!

Below I walk through the following code where I demonstrate how I extract information about users & their meetings.   This is a great example of how many vendors offer APIs to connect to their tools.

IniRead, API_Token ,Auth.ini,API, Token
IniRead, API_Key   ,Auth.ini,API, Key
IniRead, API_Secret,Auth.ini,API, Secret

;~  EndPoint:="https://api.zoom.us/v1/user/list" ;get list of users under your account
;~  EndPoint:="https://api.zoom.us/v1/meeting/list" ;get list of meetings for a given user
EndPoint:="https://api.zoom.us/v1/meeting/get" ;get specific meeting info
;~  QueryString:=QueryString_Builder({"api_key":API_Key,"api_secret":API_Secret,"data_type":"XML","host_id":"pPzEua3eSDerCD2WO3JbUg"})

;********API call**********************
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1") ;Create COM Object
HTTP.Open("POST", EndPoint . QueryString) ;GET & POST are most frequent, Make sure you UPPERCASE
HTTP.Send() ;If POST request put data in "Payload" variable
Response_data:= HTTP.ResponseText ;Save the text that is returned
SciTE_Output(Response_data) ;Text,Clear=1,LineBreak=1,Exit=0

;***********query string builder******************* 
for key, value in kvp
  queryString.=((A_Index="1")?(url "?"):("&")) key "=" value
return queryString

Video walking through developing the Zoom API call

Comments are closed.