OAuth errors when trying to do the most basic non-interactive IFrame embed

Hi

I am trying to include videos and live streams as embeds on my web page.
I’ve followed this guide about embedding a non-interactive video
https://github.com/justintv/Twitch-API/blob/master/embed-video.md

When embedded, the videos load as expected but I’m getting multiple errors in my console to do with oauth

such as

GET https://api.twitch.tv/api/viewer/token.json 401 (Unauthorized)

undefined:1 Uncaught (in promise) Object {readyState: 4, responseText: “{“error”:“Unauthorized”,“status”:401,“message”:“Token invalid or missing required scope”}”, responseJSON: Object, status: 401, statusText: “Unauthorized”}

XMLHttpRequest cannot load https://vod-storyboards.twitch.tv/v1/AUTH_system/vods_ae8a/rootcatz_22735007696_497604574/storyboards/82573585-info.json. The ‘Access-Control-Allow-Origin’ header has a value ‘https://www.twitch.tv’ that is not equal to the supplied origin. Origin ‘http://player.twitch.tv’ is therefore not allowed access.

player.e026d9a….js:7 Uncaught (in promise) Error: No channel info available on null channel ID(…)

Having read various help items from google and here the advice is to read up on the Oauth flow.
However, as this is just embedding an IFrame, I can’t see how or why I would need to start sorting out Oauth when it’s just a simple embed? Where would I even add the javascript? I feel like I’m missing some other “simple embed” option here.

With youtube I can just paste a snippet - I’m not looking to build an application, I just want to show streams and videos.

Please could someone clarify.

Many thanks.

You don’t need to do anything related to OAuth for an embed, so you’re fine. These happen when you’re not logged in. It shouldn’t change the viewing experience. They are bugs though, so I’ll file these internally. :slight_smile: Thanks for the report!

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