Embed API parent parameter: not working for specific domain

Hello,

I’ve updated my code to fill in the new required parameters as documented on https://dev.twitch.tv/docs/embed/video-and-clips/#interactive-frames-for-live-streams-and-vods. The exact same code is deployed to two different domains: one is a staging server used for testing, and the other is the production domain. The options passed to the embed constructor are identical except for the domain name.

On the staging server, the embed works fine. On the production server, I get this error:

Twitch embed error message:
[FailedAttributeCheck] mandatory requirements were not met

Docs: https://dev.twitch.tv/docs/embed/video-and-clips/

Works: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=example.com&referrer=https%3A%2F%2Fexample.com%2Fr%2Ftest&video=v654584133&width=1078
Fails: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=cytu.be&referrer=https%3A%2F%2Fcytu.be%2Fr%2Ftest&video=v654584133&width=1078
Fails: curl ‘https://player.twitch.tv/?height=607&migration=true&parent=sub.cytu.be&referrer=https%3A%2F%2Fsub.cytu.be%2Fr%2Ftest&video=v654584133&width=1078

Can you please help me understand why embeds fail on cytu.be specifically (and any subdomains)?

Why are you curl-ing them?

This is a URL supposed to be used in an iFrame.

As per the

You need to post the URl to the page that is broken, and someone can look and see the issue

Sure, here is an example: https://cytu.be/twitch-test.html

Hmm very odd. I think this might be a bug and domains ending .be are not in the acceptable list?

Raised as a bug here

Ok in my initial check I missed this

but currently your code is

    <iframe src="https://clips.twitch.tv/embed?clip=CautiousWrongAmazonTwitchRP&amp;parent=cytu.be"
            height="400"
            width="640"
            scrolling="no"
            allowfullscreen="true">
    </iframe>

The URL should be

https://clips.twitch.tv/embed?clip=CautiousWrongAmazonTwitchRP&parent=cytu.be

The &amp; is an XML escape – technically putting “&parent” into an HTML string would be incorrect markup. If you inspect element on the rendered page, you will see the literal string of the src is “&parent” – the “&amp;parent” is just the way that needs to be encoded in the page source in order to produce correct HTML.

However, just to be sure, I’ve updated the page source to the literal URL you provided and the effect is the same (same error).

Commented on the GitHub issue, thanks for opening that.

Not when specifying URL’s to things the & needs to be & to seperate the query string arguments

Thanks. Looks like the GitHub issue is following up.

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