문제

I come in order to have some information about Google API and particularly the authentication "Service account"

I have the same problem that this guy is having, and although that concerns another API, he explains the problem very well.

For a few days now I have already read some articles:

I have already registered for a Google API account and I am using the Client Key and Secret that was provided to me. I then downloaded the following libraries:

  • google-api-dotnet-client-1.2.4737-beta.source.zip
  • youtube-api-samples
  • google-youtube-v3-rev35-csharp-1.2.0-beta

Nothing has helped me so far...

I would like to know if Picasa web and the Youtube API v2 or v3 can use oAuth2.0 Service account as I am not able to find anything about that. I am currently using Picasa Web oAuthv1.0 and I found it really easy to use but I would like to migrate to Google Youtube API v3/Picasa web API.

The basic workflow idea:

  • Private Pictures and videos are created specifically for a web site.
  • Users will log into the site (it isn't a Google users) and see pictures and videos -> All users that successfully log into the site have access to all youtube videos and picasa pictures and this medias are private in Google

The only example I've found anywhere that shows how to use authentication was in a ASP.NET MVC project that unfortunately requires user interaction and i don't want that.

Can someone please me on this? Does anyone has a piece of code written in Javascript or C# for connecting to the API with Service account or is it better for now to authenticate with oAuthv1.0? Any help will be highly appreciated!!

도움이 되었습니까?

해결책

Take a look in Which Google APIs can be accessed with service account authorization? it contains a list of all APIs which support service account.

As far as I know, Picasa and Youtube don't support service account.

다른 팁

Based on the article posted by peleyal, it is my intepretation that YouTube should support the service account. In the answer on the related article, it states "All Google APIs that supports OAuth 2.0 should work with Service Accounts".

Assuming YouTube is a Google API, it also should work.

I'm not 100% confident in that answer unfortunately, because I have seen documentation elsewhere that says Service Accounts: "Several Google APIs act on behalf of an application and do not access user information." https://developers.google.com/accounts/docs/OAuth2#serviceaccount

Does accessing the YouTube APIs constitute "user information"? The answer to that question is the reason I'm not 100% confident without trying it. An expensive time proposition.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top