I just started writing a simple Zoom App using vanilla JS and PHP. I loaded the Zoom App SDK from a CDN with script tags, and got the “Unhandled Promise Rejection: ReferenceError: Can’t find variable: zoomSdk” when trying to call “configureApp()”.
Here’s a copy.paste of my code. It’s mostly copy/pasted from the documentation:
<?php
//set up OWASP Secure Headers
header('strict-transport-security: max-age=600');
header('X-Content-Type-Options: nosniff');
header('Content-Security-Policy: default-src \'self\' \'unsafe-inline\' https://appssdk.zoom.us/sdk.js');
header('Referrer-Policy: \'strict-origin-when-cross-origin\'');
?>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- external libraries -->
<script src="https://appssdk.zoom.us/sdk.js"></script>
</head>
<body>
<h1> Hello World </h1>
<script>
async function configureApp() {
const configResponse = await zoomSdk.config({
version: '0.16',
popoutSize: { width: 480, height: 360 },
capabilities: [
// The following are needed for Layers API.
...
],
});
console.log(configResponse);
}
configureApp();
</script>
...
Any suggestions appreciated