How to connect Google AppEngine and Google BigQuery through oAuth2

Today I had a big problem: How to connect Google AppEngine application and Google BigQuery through oAuth2?

After I read all the documentation and make all the tests I didn’t found the way to connect AppEngine and BigQuery without the need of to do login on a Google Account or get the grant access screen.

I downloaded the oAuth2 python lib and I read the classes and methods, after test differents things I decided to talk with Joe Gregorio at Google.com: (http://code.google.com/u/jcgregorio@google.com/) who explained me the best way to do that.

You can use AppAssertionCredentials for that:

http://google-api-python-client.googlecode.com/hg/docs/oauth2client.appengine.html#AppAssertionCredentials

Each App Engine application has an identity, and you should be able to add that identity to the ACLs for BigQuery.

Here is a sample on how to use AppAssertionCredentials on App Engine:

http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fappengine_with_robots

You can find the apps identity (email address) under the Service Account Name heading on the Application Settings page for the App Engine application.


 Google+

2 thoughts on “How to connect Google AppEngine and Google BigQuery through oAuth2

    • Hey Michael, it appears this example is no longer valid with the current libraries. Would you mind taking a look at it? Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s