Can't find variable: zoomSdk when loading from CDN

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 :pleading_face:

friends, I fixed it by turning the zoom client OFF and then back ON again. :slight_smile:

3 Likes

Thanks for sharing your solution!

Thank you very much for the solution :heart_eyes:

1 Like