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