Inconsistent behavior when attempting update of registrant approval status for Cloud Recording

Description
I have an app that automatically registers people for webinars and webinar cloud recordings. On the webinar side, the app works great. I’m able to add Webinar registrants (marketplace DOT zoom DOT us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate), then programmatically update their status (marketplace DOT zoom DOT us/docs/api-reference/zoom-api/webinars/webinarregistrantstatus) based on whether or not they’re in a predetermined list.

This should work nearly identically for the Cloud Recording side, and in fact, adding a registrant for a Cloud Recording programatically works great. The problem is that updating their status from “Pending Approval” to “Approved” works extremely inconsistently.

When my program is run line by line in a debugger, or when run in the Test Request browser environment with an identical body and headers to what is in the program, the call works exactly as intended. However, when run as part of the program without the debugger enabled, even if the user is already in the “Pending Approval” section of the Cloud Recording, no changes to their status is made, despite a 204 status code being returned.

Error
The issue here is that there is no error, despite unwanted behavior. The API endpoint returns 204 even if nothing is changed serverside. This can be reproduced easily by sending a request where the list of registrant IDs is entirely blank – 204 is returned, despite no registrant statuses being updated at all.

Another error happens when using the Webinar API to add users to the webinar after it is finished. Approved users receive an email with no subject and a link to register for access to the cloud recording, rather than a simple link to the cloud recording.

Fixing either of these would allow the app’s main functionality, which is to programmatically approve specific users to view webinars and webinar recordings, to work once again.

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT

Which Endpoint/s?
Most of the errors come from:

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  • Use the API to register and approve a user to a webinar after the webinar is already over.
  • Use the API to register and approve a user to a recording of a webinar.

Additional context
Previously, adding and approving someone to a webinar that had already ended would result in them getting a working link to the cloud recording, without requiring an additional registration. Now, they are sent an email with no subject and a link that forces them to register again despite already being approved. If the initial email’s body actually links to the cloud recording, rather than the page where someone can sign up to view a cloud recording for a webinar they are already approved for, the entire problem with the Update Recording Registrant’s Status API call is entirely irrelevant.

Hey @rich2,

I noticed you mentioned:

When my program is run line by line in a debugger, or when run in the Test Request browser environment with an identical body and headers to what is in the program, the call works exactly as intended

Can you share the code snippet where your’e running this locally? I’m wondering if this could be an edge case in your program.

If you could please also share the full request that is failing (and the meetingID and registrant ID) I’m happy to take a closer look.

Thanks!
Will

Hey Will, here’s the section of code that has to do with submitting recordings and webinar registrations. finOrNot is a simple boolean representing whether or not a user is submitting the form 3 hours after the scheduled start time, and approval is a boolean representing whether or not a user’s email is present on a list. standardPOSTH() is a function that just returns the usual headers (content-type json and the bearer token) into a variable.

    #WEBINAR ADD
    url = zoomBaseURL + meetingType + "/" + str(meetID) + "/registrants"
    payload = "{\"email\": \"" + email + "\",\"first_name\": \"" + chimpInfo["fname"] + "\", \"last_name\": \"" + chimpInfo["lname"] + "\", \"org\": \"" + chimpInfo["company"] + "\"}"
    headers = standardPOSTH()
    response = requests.request("POST", url, headers=headers, data = payload) #makes the request
    meeting = response.json() #translates the json object into a dictionary 
    if approval:
        #WEBINAR APPROVE
        url = zoomBaseURL + meetingType + "/" + str(meetID) + "/registrants/status"
        payload = '''{\"action\": \"approve\",\"registrants\": [{\"id\": \"'''+ meeting["registrant_id"] + '''\",\"email\": \"''' + email + '''\"}]}'''
        headers = standardPOSTH()
        response = requests.request("PUT", url, headers=headers, data = payload)
    if finOrNot == True: #ADD THEM AND APPROVE THEM TO WEBINAR FIRST
        #ADD AS RECORDING REGISTRANT
        url = zoomBaseURL + "meetings/" + str(meetID) + "/recordings/registrants"
        payload = "{\"email\": \"" + email + "\",\"first_name\": \"" + chimpInfo["fname"] + "\", \"last_name\": \"" + chimpInfo["lname"] + "\", \"org\": \"" + chimpInfo["company"] + "\"}"
        headers = standardPOSTH()
        response = requests.request("POST", url, headers=headers, data = payload) #makes the request
        meeting = response.json() #translates the json object into a dictionary 
        if approval:
        #RECORDING APPROVE
            url = zoomBaseURL + "meetings/" + str(meetID) + "/recordings/registrants/status"
            payload = '''{\"action\": \"approve\",\"registrants\": [{\"id\": \"''' + meeting["registrant_id"] + '''\"}]}'''
            headers = standardPOSTH()
            response = requests.request("PUT", url, headers=headers, data = payload)

The problem isn’t that the request fails – just the opposite. I get no error message at all, only a 204 response with no body, every time I run that last request.

An example ID for the recording would be 84696057299, and a user with the ID of XniCo0p9QVmiBJqxK6QxJw tried to register, but it didn’t go through, despite returning a 204.

Hey @rich2,

Thanks for laying this out in such detail—Our team is looking into this (ZOOM-151205). It’s likely that in these instances, the registrant is still in “pending” because of async processes. As a workaround while we investigate this, you may find that adding a delay of ~3 seconds after each registrant update may resolve the issue.

That said, I will follow up with you here as I have updates.

Thanks,
Will

Hi Will,
After converting my entire program into an asynchronous one, it works nearly completely. However, I still get two emails when testing. One email gives me a link to register, even though the button says watch, and has no subject. The other email gives me a functional link, and has a subject.

Is this related to approving people for a webinar after it closes?

Screenshots are below:

Additionally, I got this error message, which is handled correctly, but has a grammatical error in it, when I submit a POST request to a meeting that doesn’t require registration.

In the screenshot below, the message underneath “something went wrong” is directly output from the error message.

Hey @rich2,

Thanks for these additional details and the screenshots! For the second email, sent out after webinar registration approval for the recording, this would be expected. However, for the first email, I’m not sure why there’s not subject here/link is not functional, and this seems like a bug (likely related to the fact the webinar has passed). Can you confirm the webinar ID for which that first email was generated? I’d like to log this with our team.

As for the typo—thank you for pointing this out! We will make sure to correct this.

Thanks,
Will

The webinar ID was 897 0910 9943.

Thanks for providing that @rich2. Our team will take a closer look at this. (ZOOM-203623)

Best,
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.