google api - How to grant my youtube-api application read-only access to many Youtube accounts? -


i'm working on application generates reports , statistics youtubers channels. couldn't find in google docs, how youtube user can grant read-only access application youtube account? (i'm meant facebook application).

i'm little confused how many ways of authentication in google api , 1 should use.

when want access private channel data, need use oauth authorization.

the way works app redirects clients google's authorization page, on can pick youtube channel associated google account. if not logged-in, first asked google log in (authenticate) , proceed authorization page.

once on authorization page, can decide grant or refuse application access whatever application demands access to. important part: when application redirects user authorization page, must specify 1 or more scopes.

scopes define sets of actions application can perform once user gives permission. application cannot perform operations aren't within scope of powers. 3 important scopes of youtube api are:

https://www.googleapis.com/auth/youtube: manage youtube account https://www.googleapis.com/auth/youtube.readonly: view youtube account https://www.googleapis.com/auth/youtube.upload: manage youtube videos

that means can ask users give application read-only access channel configuring app use https://www.googleapis.com/auth/youtube.readonly scope. example of url application redirects users like:

https://accounts.google.com/o/oauth2/v2/auth? scope=https%3a%2f%2fwww.googleapis.com%2fauth%2fyoutube.readonly& access_type=offline& redirect_uri=http%3a%2f%2flocalhost%2foauth2callback& response_type=code& client_id=client_id 

and page looks like:

youtube api oauth consent screen

for more information, please read 'using oauth 2.0 web server applications' on google developers.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -