Twitch Chat Embed Error (HTTP vs HTTPS)

Hello,

I’m quite new and experiencing an error I’m unsure how to address if it even needs addressing.

My website I’m testing is HTTP only presently. When attempting to embed chat, I receive this when in Chrome 51:

https://web-cdn.ttvnw.net/emberchat-8690f622aa4cb9072e60e5ed0ef6d49f.js:38, about column 1772

Uncaught SecurityError: Blocked a frame with origin “https://www.twitch.tv” from accessing a frame with origin “http://mysitehere.com”. The frame requesting access has a protocol of “https”, the frame being accessed has a protocol of “http”. Protocols must match.

In IE 11, I’m just getting a basic Access Denied.

It looks like it’s https and referring to it’s parent, my site, that is http only. If I want to embed twitch chat in my site, is it a requirement that I get a SSL cert to avoid this error?

This is all of my code for how I’m testing (following https://github.com/justintv/Twitch-API/blob/master/embed-chat.md):

[code]

[/code]

Thanks for any help!

You can embed without HTTPS. There will be an “error” regardless. With HTTPS, it’ll be origin mismatch instead. This shouldn’t stop the embedded chat from working.

2 Likes

I have no idea what is different today, but it is indeed working exactly as you described. I didn’t even change the code, it just kicked in somehow (maybe something cached had to expire?). Thanks!

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