Trying to create webinar with jwt auth. Keep getting 400 error

Description
Keep getting 400 error when calling create webinar api

Error

400 Bad Request

400 Bad Request


zoom

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

Which Endpoint/s?
https://eu01api-www4local.zoom.us/users/me/webinars

I get nice 201 when sending body as test request but 400 when sending from my application.

{
“topic”: “TEST WEBI”,
“type”: 5,
“start_time”: “”,
“duration”: 30,
“timezone”: “EUROPE/AMSTERDAM”,
“password”: “”,
“agenda”: “TEST_WEBI”,
“settings”: {
“host_video”: “true”,
“panelists_video”: “false”,
“practice_session”: “false”,
“hd_video”: “false”,
“approval_type”: 2,
“registration_type”: 1,
“audio”: “both”,
“auto_recording”: “cloud”,
“enforce_login”: “false”,
“close_registration”: “false”,
“show_share_button”: “false”,
“allow_multiple_devices”: “false”,
“registrants_email_notification”: “false”
}
}

Hey @4strax,

When I test with this request body, I am able to create a webinar successfully.

Can you double check that your JSON is valid and using standard " and not curly ?

Let me know if this helps,
Will

Hi Will.

I keep getting a 404. Trying something different. When i schedule the webinar in my zoom account, can i put the start webinar url in an iframe of my web application?

Kind regards/Met vriendelijke groet,

Mike Wouters

4strax

Met vriendelijke groet,

Mike Wouters

4strax

Hey @4strax,

Thank you for the update. Looking at the endpoint that you’re using, it looks to be custom. Please try using the default API endpoint and let me know if the issue persists.

Endpoint: https://api.zoom.us/v2/users/me/webinars

If that doesn’t work for you, does changing me to your userID produce different results?

I hope that helps!

Thanks,
Max

here is my code:

BEGIN

– content

l_content_length := nvl(dbms_lob.getlength(p_request_body),0);

– first delete old headers

apex_web_service.g_request_headers.delete();

apex_web_service.g_request_headers(1).name := ‘Authorization :’;

apex_web_service.g_request_headers(1).value := 'Bearer '|| l_jwt_token;

apex_web_service.g_request_headers(2).name := ‘Accept :’;

apex_web_service.g_request_headers(2).value := ‘application/json’;

apex_web_service.g_request_headers(3).name := ‘Content-Type :’;

apex_web_service.g_request_headers(3).value := ‘application/json’;

apex_web_service.g_request_headers(4).name := ‘Content-Length :’;

apex_web_service.g_request_headers(4).value := l_content_length;

l_result := apex_web_service.make_rest_request(

p_url => ‘https://api.zoom.us/v2/users/t5xPJNKxTfOCm9Z5xhfEJg/webinars’,

p_http_method => ‘POST’,

p_body => to_clob(’{

“topic”: “TST PK ZOOM”,

“type”: 5,

“start_time”: “”,

“duration”: 30,

“timezone”: “EUROPE/AMSTERDAM”,

“password”: “”,

“agenda”: “TST PK ZOOM”,

“settings”: {

“host_video”: “true”,

“panelists_video”: “false”,

“practice_session”: “false”,

“hd_video”: “false”,

“approval_type”: 2,

“registration_type”: 1,

“audio”: “both”,

“auto_recording”: “cloud”,

“enforce_login”: “false”,

“close_registration”: “false”,

“show_share_button”: “false”,

“allow_multiple_devices”: “false”,

“registrants_email_notification”: “false”

}

}’),

p_wallet_path => l_wallet_location,

p_wallet_pwd => l_wallet_password

);

l_status_code := apex_web_service.g_status_code;

– return

RETURN l_result;

EXCEPTION

when others

then

dbms_output.put_line(‘Others send request’||sqlerrm||’ ‘||l_status_code||’ result '||l_result);

END;

This is what i get back:

status code 401

result {“code”:124,“message”:“Invalid access token.”}

i’ve tried with a new jwt token, with https://api.zoom.us/v2/users/me/webinars and with the european endpoint. Same result.

Kind regards/Met vriendelijke groet,

Mike Wouters

4strax

Hey @4strax,

Thank you for providing additional information. Given that your test requests work as expected, it seems that the way the application is formatting the request could be contributing to the issue. For example, looking at historical posts in the forum, I was able to find a similar issue where the solution was to ensure that the request body is properly generated.

I hope that helps!

Thanks,
Max

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