Clips Discovery Embed Error

Hello,
I am trying to embed clips on my website following the clips discovery guide (https://dev.twitch.tv/docs/v5/guides/clips-discovery)

I keep getting the following error:
[NoParent] parent query string value was not specified

Here is my code:

<html>
<head>
   <title>Clips Carousel</title>
 
</head>
<body>
   <div id="clips-display">

   </div>
      <script>
var httpRequest = new XMLHttpRequest();

httpRequest.addEventListener('load', clipsLoaded);
httpRequest.open('GET', 'https://api.twitch.tv/kraken/clips/top?limit=10&game=Overwatch&trending=true');
httpRequest.setRequestHeader('Client-ID', 'MY-CLIENT-ID');
httpRequest.setRequestHeader('Accept', 'application/vnd.twitchtv.v5+json');

httpRequest.send();

function clipsLoaded() {
    var clipsDisplay = document.getElementById('clips-display'),
        clipList = JSON.parse(httpRequest.responseText);

    clipList.clips.forEach(function(clip, index, array) {
        clipItem = document.createElement('div');
        clipItem.innerHTML = clip.embed_html;
        clipsDisplay.appendChild(clipItem);
    });
}
</script>

</body>


</html>

I’m really struggling with this and any guidance in the right direction would be greatly appreciated.

The embed HTML has not (and probably won’t be)

Updated to support the parent argument as it doesn’t know what site to substitute in

You’d be better off using an API to get the clip ID’s then using

To display the clip

Hi Barry,

Thanks so much for responding. I’ve struggling with API to get the clips as well. Just wanted to confirm, Do you need an SSL while testing locally for API TWITCH CLIPS? No matter what I do, I get the embeded error, parent string not specified.

If your URL is “localhost” then you won’t need SSL

You will still need the parent argument

Just to confirm, “localhost” would be the parent argument when testing locally?

The parent should match the domain name in the URL.

So for localhost that would be localhost

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