[Error] "Request header field Client-ID is not allowed by Access-Control-Allow-Headers in preflight response."

I would remove ajaxSetup from your code completely. It isn’t necessary to interact with the Twitch API.