2016-10-22 4 views
0

관리자 페이지에서 내 사용자를 인증 한 다음 다음 YouTube 생방송에 타이머를 표시하고 내 페이지에서 직접 연결할 수있는 CMS 사이트 용 위젯을 만들려고합니다.인증없이 YouTube API를 사용하십시오.

성공적으로 youtube.liveBroadcasts.list API를 사용하고 내 브로드 캐스트 목록을 수신하여 페이지에 표시했습니다. 하지만 로그인하거나 다른 종류의 인증을 사용하지 않고 다른 사용자가 페이지를 방문 할 때 페이지에 내 채널에 대한 정보를 표시하려고합니다.

답변

1

YouTube API에서이 요청을 사용하면 로그인이 필요하다고 생각합니다. 나는 그것이도에 도움이 될 생각

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

: 예를 들어, 당신은 단지 로그온되는 오류가 발생하는 것없이 브라우저

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

에 브라우저 LiveBroadcasts.list URI 요청이 붙여 넣을 때 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 호출을 수행 할 수있는 권한이 부여 될 필요가 있다고 생각합니다.

관련 문제