0

I'm trying to make a widget for CMS Sites where I can authenticate my user on the admin page and then show a timer to the next youtube live broadcast and link directly to it from my page.

I have successfully used the youtube.liveBroadcasts.list api and received a list of my broadcasts and showing it on a page. But I want to be able to show this(about my channel) on a page when another user visits the page, without the need to login or use authentication of any kind.

1 Answer 1

1

I think to use this requests from Youtube API, a Login is Required. For example when you just paste this in your browser LiveBroadcasts.list URI request in your browser

https://www.googleapis.com/youtube/v3/liveBroadcasts

without being logged-on you'd get an error:

"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization",

I think it would also help to read on Implementing OAuth 2.0 Authorization.

These are the supported OAuth flows:

  1. The server-side flow supports web applications that can securely store persistent information.
  2. The client-side flow supports JavaScript applications running in a browser.
  3. The installed application flow supports applications installed on a device, such as a phone or computer.
  4. The device flow supports devices with limited input capabilities, such as game consoles and video cameras.

*The service account flow supports server-to-server interactions that do not access user information. However, the YouTube Data API does not support this flow. Since there is no way to link a Service Account to a YouTube account, attempts to authorize requests with this flow will generate a NoLinkedYouTubeAccount error.

In short, I think you need to be authorized to perform this API call.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.