Here is the code I am using. Content-type is application/json. If I json.dump the data dict instead of just sending the data dict, I get a 204 response but the response body is null. Would really appreciate some help.
code
payload = {
'iss': api_key,
'exp': datetime.utcnow() + timedelta(hours=2)
}
token = jwt.encode(payload, api_sec)
# call API: edit meeting
url = 'https://api.zoom.us/v2/meetings/' + id
headers = {
'authorization': "Bearer %s" % token,
'content-type': "application/json"
}
data = {
'topic': form.name.data,
'agenda': form.agenda.data,
'type': 2,
'start_time': meetingDate.strftime('%Y-%m-%d') + 'T' + startTime.strftime('%H:%M:%S'),
'duration': form.duration.data,
'timezone': 'America/New_York',
'password': form.password.data,
'settings': {
'host_video': form.start_meeting_when_host_joins.data,
'participant_video': form.start_meeting_when_participant_joins.data,
'waiting_room': form.waiting_room.data,
'join_before_host': form.join_before_host.data,
'jbh_time': form.jbh_time.data,
'mute_upon_entry': form.mute_upon_entry.data,
'approval_type': form.approval_type.data,
'meeting_authentication': form.meeting_authentication.data,
'allow_multiple_devices': form.allow_multiple_devices.data
}
}
r = requests.patch(url, data=data, headers=headers)
if r.status_code != 204:
flash('Zoom api call failed - return status: %s' % r.status_code, 'danger')
return render_template(
'zoom/action_zoom_meeting.html',
jumbotron_content='zoom/zoom_jumbotron.html',
form=form,
action='Edit'
)