Twitch, jquery and my URL

Can i send some data from extensions to my sql server and get response?
I try it but its not working…


<div id="response"> </div>
<input name='a1' id='a1'>
<button id='ddd'>send</button>


var ra1 = document.getElementById("a1").value; 
     type: 'post',
     url: '',
     data: { a1:  ra1 },
     success: function (res) {


Well what does it say in the console?

This looks like a general “I don’t know Javascript” than an extensions problem?

I allow adress on Whitelist URL

I open it on inspect mode

and have this error:
Refused to load the script ‘’ because it violates the following Content Security Policy directive: “script-src ‘self’”. Note that ‘script-src-elem’ was not explicitly set, so ‘script-src’ is used as a fallback.

and then my main script.js have error :
Uncaught ReferenceError: $ is not defined
at script4.js:1

Can I allow JQUERY?


You cannot use external JS in extensions.

All JS (except the TwitchExt JS Helper and Google Analytics) must be included in your local bundle.

See section 2 - Extensions Guidelines & Policies | Twitch Developers
Specifically 2.8

The Allowlist is for allowing you to display functioning <a href="somesite"> links not for external library includes

Thank. I find it and give thats links as file and it works.