2016-10-22 21 views
0

私は管理者ページで自分のユーザーを認証し、次のYouTubeライブブロードキャストにタイマーを表示し、自分のページから直接そのサイトにリンクできるCMSサイト用のウィジェットを作ろうとしています。認証なしでYoutube APIを使用

youtube.liveBroadcasts.list apiを正常に使用し、自分のブロードキャストのリストを受信して​​ページに表示しました。しかし、他のユーザーがログインしたり、あらゆる種類の認証を使用したりせずに、このページ(自分のチャンネルについて)をページに表示できるようにしたい。

答えて

1

私はYoutube APIからこのリクエストを使用すると思いますが、ログインは必須です。あなただけのログオンせずに、ブラウザ

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

でブラウザ LiveBroadcasts.list URIリクエストでこれを貼り付けるときにたとえば、あなたがエラーを取得したい:

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

は、私はそれも役立つと思いますImplementing OAuth 2.0 Authorizationを読んでください。

これらがサポートOAuthのフローをされています。要するに

  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.

を、私はあなたがこのAPI呼び出しを実行するために承認される必要があると思います。

関連する問題