trying to update user settings.
Have seeming valid JSON object as verified by JSON formatter.
Use identical JSON object that works through API test facility.
get error 300,“message”:“Request Body should be a valid JSON object.”
Object is here:
{
“email_notification”: {
“alternative_host_reminder”: 0,
“cancel_meeting_reminder”: 0,
“jbh_reminder”: 0,
“schedule_for_reminder”: 0
},
“in_meeting”: {
“allow_live_streaming”: 0,
“annotation”: 0,
“attendee_on_old”: 0,
“auto_saving_chat”: 1,
“breakout_room”: 1,
“chat”: 1,
“closed_caption”: 0,
“co_host”: 0,
“custom_data_center_regions”: 0,
“e2e_encryption”: 0,
“entry_exit_chime”: “none”,
“far_end_camera_control”: 0,
“feedback”: 1,
“group_hd”: 0,
“non_verbal_feedback”: 0,
“polling”: 1,
“private_chat”: 0,
“record_play_voice”: 1,
“remote_control”: 0,
“remote_support”: 0,
“show_meeting_control_toolbar”: 1,
“virtual_background”: 0,
“waiting_room”: 1
},
“recording”: {
“auto_delete_cmr”: 0,
“auto_recording”: “none”,
“cloud_recording”: 1,
“local_recording”: 1,
“record_audio_file”: 1,
“record_gallery_view”: 0,
“record_speaker_view”: 1,
“recording_password_requirement”: {
“have_letter”: 1,
“have_number”: 1,
“have_special_character”: 1,
“length”: 8,
“only_allow_numeric”: 0
},
“save_chat_text”: 1,
“show_timestamp”: 0
},
“schedule_meeting”: {
“audio_type”: “both”,
“embed_password_in_join_link”: 1,
“force_pmi_jbh_password”: 1,
“host_video”: 1,
“join_before_host”: 0,
“not_store_meeting_topic”: 0,
“participants_video”: 0,
“personal_meeting”: 1,
“pmi_password”: “zOLE1”,
“pstn_password_protected”: 1,
“require_password_for_instant_meetings”: 1,
“require_password_for_pmi_meetings”: “all”,
“require_password_for_scheduling_new_meetings”: 1,
“use_pmi_for_instant_meetings”: 0,
“use_pmi_for_scheduled_meetings”: 0
}
}
Hi @laeggan, in JSON boolean values can only be either true
or false
. 0
or 1
will be returned as invalid. Hope this helps!
Reference: JSON Schema
Using 0 and 1 worked fine for the create meeting API call.
I changed to true/false and still same error. Here is (JSON checked) new object:
{“email_notification”:{“email_notification”:false,“alternative_host_reminder”:false,“cancel_meeting_reminder”:false,“jbh_reminder”:false,“schedule_for_reminder”:false},“in_meeting”:{“allow_live_streaming”:false,“annotation”:false,“attendee_on_old”:false,“auto_saving_chat”:true,“breakout_room”:true,“chat”:true,“closed_caption”:false,“co_host”:false,“custom_data_center_regions”:false,“e2e_encryption”:false,“entry_exit_chime”:“none”,“far_end_camera_control”:false,“feedback”:true,“group_hd”:false,“non_verbal_feedback”:false,“polling”:true,“private_chat”:false,“record_play_voice”:true,“remote_control”:false,“remote_support”:false,“show_meeting_control_toolbar”:true,“virtual_background”:false,“waiting_room”:true},“recording”:{“auto_delete_cmr”:false,“auto_recording”:“none”,“cloud_recording”:true,“local_recording”:true,“record_audio_file”:true,“record_gallery_view”:false,“record_speaker_view”:true,“recording_password_requirement”:{“have_letter”:true,“have_number”:true,“have_special_character”:true,“length”:8,“only_allow_numeric”:false},“save_chat_text”:true,“show_timestamp”:false},“schedule_meeting”:{“audio_type”:“both”,“embed_password_in_join_link”:true,“force_pmi_jbh_password”:true,“host_video”:true,“join_before_host”:false,“not_store_meeting_topic”:false,“participants_video”:false,“personal_meeting”:true,“pmi_password”:“zOLEtrue”,“pstn_password_protected”:true,“require_password_for_instant_meetings”:true,“require_password_for_pmi_meetings”:“all”,“require_password_for_scheduling_new_meetings”:true,“use_pmi_for_instant_meetings”:false,“use_pmi_for_scheduled_meetings”:false}}
Hey @laeggan,
I just tried with your JSON and it worked:
{
"email_notification": {
"email_notification": false,
"alternative_host_reminder": false,
"cancel_meeting_reminder": false,
"jbh_reminder": false,
"schedule_for_reminder": false
},
"in_meeting": {
"allow_live_streaming": false,
"annotation": false,
"attendee_on_old": false,
"auto_saving_chat": true,
"breakout_room": true,
"chat": true,
"closed_caption": false,
"co_host": false,
"custom_data_center_regions": false,
"e2e_encryption": false,
"entry_exit_chime": "none",
"far_end_camera_control": false,
"feedback": true,
"group_hd": false,
"non_verbal_feedback": false,
"polling": true,
"private_chat": false,
"record_play_voice": true,
"remote_control": false,
"remote_support": false,
"show_meeting_control_toolbar": true,
"virtual_background": false,
"waiting_room": true
},
"recording": {
"auto_delete_cmr": false,
"auto_recording": "none",
"cloud_recording": true,
"local_recording": true,
"record_audio_file": true,
"record_gallery_view": false,
"record_speaker_view": true,
"recording_password_requirement": {
"have_letter": true,
"have_number": true,
"have_special_character": true,
"length": 8,
"only_allow_numeric": false
},
"save_chat_text": true,
"show_timestamp": false
},
"schedule_meeting": {
"audio_type": "both",
"embed_password_in_join_link": true,
"force_pmi_jbh_password": true,
"host_video": true,
"join_before_host": false,
"not_store_meeting_topic": false,
"participants_video": false,
"personal_meeting": true,
"pmi_password": "zOLEtrue",
"pstn_password_protected": true,
"require_password_for_instant_meetings": true,
"require_password_for_pmi_meetings": "all",
"require_password_for_scheduling_new_meetings": true,
"use_pmi_for_instant_meetings": false,
"use_pmi_for_scheduled_meetings": false
}
}
Please try the JSON above and let me know if it works.
Thanks,
Tommy
I tried what you had and I still get the same error:
{“code”:300,“message”:“Request Body should be a valid JSON object.”}
I am getting the same problem trying to schedule a meeting. The object works fine when I past it into the test facility, but when I use it from code I get this error:
{“code”:300,“message”:“Request Body should be a valid JSON object.”}
I also ran the object through the JSON validate site. Here is the object:
{“settings”:{“host_video”:true,“participant_video”:true,“cn_meeting”:false,“in_meeting”:false,“join_before_host”:true,“mute_upon_entry”:false,“watermark”:false,“use_pmi”:true,“approval_type”:0,“registration_type”:1,“audio”:“voip”,“auto_recording”:“none”,“enforce_login”:false,“close_registration”:false,“waiting_room”:true,“registrants_email_notification”:false,“meeting_authentication”:false},“type”:2,“timezone”:“America/Anchorage”,“agenda”:“OLE Class”,“topic”:“Humor in the Time of Covid”,“start_time”:“2020-05-26T13:00:00”,“duration”:45,“password”:“20201523”}
Never mind. I got it figured. When going from array object via json_decode, use 0 for false, 1 for true. Then do not addcslashes() the object.
Works great.
Happy to hear you got it working!
Thanks,
Tommy