# Refused to create a worker

**URL:** <https://devforum.zoom.us/t/refused-to-create-a-worker/133314>\
**Category:** Video SDK\
**Tags:** video-sdk\
**Created:** [May 29, 2025, 2:23am UTC](https://devforum.zoom.us/t/refused-to-create-a-worker/133314 "2025-05-29T02:23:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![khedr.developer](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@khedr.developer](https://devforum.zoom.us/u/khedr.developer)\
**Post date:** [May 29, 2025, 2:23am UTC](https://devforum.zoom.us/t/refused-to-create-a-worker/133314/1 "2025-05-29T02:23:22Z")

</div>

```auto
            _logger.LogInformation("Generating Zoom signature for session: {SessionName}, role: {Role}", sessionName, role);

            var storeScope = await _storeContext.GetActiveStoreScopeConfigurationAsync();
            var zoomMeetingSettings = await _settingService.LoadSettingAsync<ZoomMeetingSettings>(storeScope);

            var sdkKey = zoomMeetingSettings.SDKKey;
            var sdkSecret = zoomMeetingSettings.SDKSecret;

            var now = DateTimeOffset.UtcNow;
            var iat = now.ToUnixTimeSeconds();
            var exp = now.AddMinutes(30).ToUnixTimeSeconds(); 

            var header = new JwtHeader(new SigningCredentials(
                new SymmetricSecurityKey(Encoding.UTF8.GetBytes(sdkSecret)),
                SecurityAlgorithms.HmacSha256));

            var payload = new JwtPayload
            {
                { "app_key", sdkKey }, 
                { "tpc", sessionName }, 
                { "role_type", role }, 
                { "version", 1 }, 
                { "iat", iat },
                { "exp", exp } 
            };

            var token = new JwtSecurityToken(header, payload);
            var handler = new JwtSecurityTokenHandler();
            _logger.LogInformation("Zoom signature generated successfully for session: {SessionName}", sessionName);

            string jwt = handler.WriteToken(token);
            
            return jwt;

```

Hello,  
using c# code to generate the JWT I get this error, any help?  
thank you  
tp.min.js:1 Refused to create a worker from ‘blob:[https://localhost:4435/db64b9d5-f763-470b-9ae4-80125ea9d5d6](https://localhost:4435/db64b9d5-f763-470b-9ae4-80125ea9d5d6)’ because it violates the following Content Security Policy directive: “script-src \* ‘unsafe-inline’ ‘unsafe-eval’”. Note that ‘worker-src’ was not explicitly set, so ‘script-src’ is used as a fallback. Note that ‘\*’ matches only URLs with network schemes (‘http’, ‘https’, ‘ws’, ‘wss’), or URLs whose scheme matches `self`’s scheme. The scheme ‘blob:’ must be added explicitly.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [May 30, 2025, 1:43am UTC](https://devforum.zoom.us/t/refused-to-create-a-worker/133314/2 "2025-05-30T01:43:27Z")

</div>

Hey @khedr.developer

Thanks for your feedback.

This might be caused by an incompatibility between the Content Security Policy (CSP) on your web server and the Video SDK Web. You can refer to the documentation to add the appropriate rules to your CSP configuration.

> **[Video SDK - web - Browser support](https://developers.zoom.us/docs/video-sdk/web/browser-support/#content-security-policy-header)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 31, 2025, 2:43am UTC](https://devforum.zoom.us/t/refused-to-create-a-worker/133314/3 "2025-05-31T02:43:41Z")

</div>

Closed on May 31, 2025, 2:43am UTC

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