Sunday, October 23, 2011

Support client_secrets.json file format

Joe Gregorio mentioned google-api-python-client has supported ClientSecrets at his Google+.


Then google-api-perl-client has supported the format.


Please see following sample.

https://github.com/comewalk/google-api-perl-client/blob/master/eg/plus/plus_with_clientsecrets.pl


my $client = Google::API::Client->new;
my $service = $client->build('plus', 'v1');

my $file = "$FindBin::Bin/client_secrets.json";
my $auth_driver = Google::API::OAuth2::Client->new_from_client_secrets($file, $service->{auth_doc});


See Also:

The file format is (loosely) defined here:
http://code.google.com/p/google-api-python-client/wiki/ClientSecrets
The oauth2client/google-api-python-client support is explained here:
http://code.google.com/p/google-api-python-client/wiki/ClientSecretsSupport

Thank you for your waiting for a while. I was a little bit busy in these days for YAPC::Asia Tokyo 2011, Google Developer Day 2011 Tokyo and so on.


Enjoy!

No comments:

Post a Comment