0

I am trying to update data in a Zoom meeting via the API with the following Classic ASP code:

'Get access token
access_token = getJWTToken()

strState = "nsw"

varStart = dateFormat(strStart,"yyyy-mm-dd") & "T" & dateFormat(strStart,"HH:MM:SS")
varDuration = dateDiff("n", strStart, strEnd)
varTimeZone = getTimeZone(strState)

postURL = zoom_url & "//webinars//" & webinarId
parmToSend = "{""topic"":""" & strTitle & """," & _
    """type"":""5""," & _
    """start_time"":""" & varStart & """," & _
    """duration"":""" & varDuration & """," & _
    """timezone"":""" & varTimeZone & """," & _
    """agenda"":""" & strDescription & """," & _
    """settings"":{" & _
    "   ""host_video"":""false""," & _
    "   ""panelists_video"":""false""," & _
    "   ""practice_session"":""true""," & _
    "   ""hd_video"":""false""," & _
    "   ""approval_type"":""0""," & _
    "   ""close_registration"":""false""," & _
    "   ""show_share_button"":""false""," & _
    "   ""allow_multiple_devices"":""true""," & _
    "   ""registrants_confirmation_email"":""true""," & _
    "   ""registrants_restrict_number"":""" & strSeats & """," & _
    "   ""notify_registrants"":""false""" & _
    "   }" & _
    "}"

Set ServerXmlHttp = Server.CreateObject("MSXML2.XMLHTTP.6.0")
ServerXmlHttp.open "PATCH", postURL
ServerXmlHttp.setRequestHeader "Accept", "application/json"
ServerXmlHttp.setRequestHeader "Content-Type", "application/json"
ServerXmlHttp.setRequestHeader "Authorization", "Bearer " & access_token
ServerXmlHttp.send parmToSend

jsonResponse = ServerXmlHttp.responseText

It works intermittently but atm it keeps coming back with the same error:

msxml6.dll error '80070005'

Access is denied.

It fails on the following line:

ServerXmlHttp.send parmToSend

Can anyone help me with why this is happening?

Thanks

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Benzine
  • 472
  • 1
  • 5
  • 19
  • Unfortunately not. If I change the create object to MSXML2.ServerXMLHTTP.6.0 I get the following error message: msxml6.dll error '80072efe' The connection with the server was terminated abnormally. – Benzine Oct 13 '20 at 06:10
  • Well actually it does, as they are probably both linked. You're no longer getting the Access Denied error but now the server you're requesting is ending the connection. What is the `zoomURL` and why the double forward slash in the path segments of the uri? – user692942 Oct 13 '20 at 07:00
  • 1
    Think the issue is the double forward slashes in the URI, should be something like `https://api.zoom.us/v2/webinars/{webinarid}` according [the documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarupdate) not `https://api.zoom.us/v2//webinars//{webinarid}`. The `ServerXMLHTTP` is a lot stricter on how URIs are constructed. – user692942 Oct 13 '20 at 07:14

0 Answers0