API Webinar Registration doesn't add user to Registrants list

I seem to be successfully adding registrants to a webinar using the Zoom API and python. I’ve confirmed this as the registrant is receiving a notification email. Despite the successful email, I don’t see the registrant in the front end view under the “Manage Attendees” section of the webinar page. Intent of the code is to loop through a CSV file and register individuals line by line into an appropriate webinar. Using OAuth.

import requests
import csv
import pandas as pd
import json
api = API_KEY
url = “https://api.zoom.us/v2/webinars/
input_values = pd.read_csv(REGISTRATION.csv, delimiter=’,’)
headers = {‘content-type’: “application/json”,‘authorization’: "Bearer " + api}
for i in range(len(input_values)):
payload = {‘email’:input_values.email[i],‘first_name’:input_values.first_name[i]}
WebinarID = str(input_values.WebinarID[i])
r = requests.post(url + WebinarID + “/registrants”, data=json.dumps(payload), headers=headers)
print(payload)
print(r.text)
if r.ok:
print(“complete”)
else:
print(“error”)

Response:
{“registrant_id”:"###",“id”:###,“topic”:“API Test”,“start_time”:“2020-06-29T22:00:00Z”,“join_url”:“https://test.com”}

Thank you

Hey @pavel.medvedev,

For your webinar registration settings, are you using automatically approve or manually approve?

Thanks,
Tommy

Hi @tommy , automatically approve. It’s strange as I’m getting the invites sent to the email address and am able to join the webinar.

Hey @pavel.medvedev,

That is strange, are you able to pull the registrant list using the API?

Thanks,
Tommy

Hi @tommy I think I figured it out. The demo registrants I was using in my file had different names, but all contained the same email address. As soon as I changed the email address, they appeared as net new on the report. Appreciate the help!

Before I start a new thread, do you have information you can redirect me to on how I can refresh an API token via python? I’m looking at this for my direction: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html

1 Like

Hey @pavel.medvedev,

Nice find! Glad you figured it out!

As for your python question, I don’t have a specific library to suggest, but you just make http requests, here is the guide:

Thanks,
Tommy