# Can't find variable: zoomSdk when loading from CDN

**URL:** <https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737>\
**Category:** Zoom Apps\
**Created:** [November 13, 2022, 9:32pm UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737 "2022-11-13T21:32:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan.cheng](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/evan.cheng/32/42970_2.png) [@evan.cheng](https://devforum.zoom.us/u/evan.cheng)\
**Post date:** [November 13, 2022, 9:32pm UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737/1 "2022-11-13T21:32:38Z")

</div>

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:

```auto
<?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 🥺

---

<div class="post-metadata">

**Author:** ![evan.cheng](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/evan.cheng/32/42970_2.png) [@evan.cheng](https://devforum.zoom.us/u/evan.cheng)\
**Post date:** [November 14, 2022, 12:57am UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737/2 "2022-11-14T00:57:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 16, 2022, 10:24pm UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737/5 "2022-11-16T22:24:59Z")

</div>

Thanks for sharing your solution!

---

<div class="post-metadata">

**Author:** ![skatetownguide](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/skatetownguide/32/30302_2.png) [@skatetownguide](https://devforum.zoom.us/u/skatetownguide)\
**Post date:** [November 20, 2022, 3:13pm UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737/6 "2022-11-20T15:13:52Z")

</div>

Thank you very much for the solution [😍](https://shaw-speed-test.ca/)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 22, 2022, 8:51pm UTC](https://devforum.zoom.us/t/cant-find-variable-zoomsdk-when-loading-from-cdn/78737/7 "2022-11-22T20:51:56Z")

</div>

Closed on November 22, 2022, 8:51pm UTC


