Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:59:33+00:00 2026-06-13T19:59:33+00:00

This question seems like it should be so simple to answer, but after days

  • 0

This question seems like it should be so simple to answer, but after days of research and several dead ends, I can’t seem to get query results out of BigQuery without it insisting on user-based OAuth. Has anyone had any luck with this? I am not using Google AppEngine for my app, it is hosted in EC2. Here is the exact situation:

User wants reporting data -->
Web server makes queries to BigQuery -->
Data is transformed for use in WebApp and returned to User.

Whenever I follow the Google examples, I end up getting a web browser popping up asking for me to select a Google account to use for authentication.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:59:34+00:00Added an answer on June 13, 2026 at 7:59 pm

    Sorry this is being so challenging to find info on. You’re looking for what’s called Service Accounts which are documented in our Authorizing Access to the BigQuery API using OAuth 2.0 guide.

    Here’s an example, using the Python client library, though you’ll want to look at the referenced documentation for info on acquiring the appropriate credentials:

    import httplib2
    
    from apiclient.discovery import build
    from oauth2client.client import SignedJwtAssertionCredentials
    
    # REPLACE WITH YOUR Project ID
    PROJECT_NUMBER = 'XXXXXXXXXXX'
    # REPLACE WITH THE SERVICE ACCOUNT EMAIL FROM GOOGLE DEV CONSOLE
    SERVICE_ACCOUNT_EMAIL = 'XXXXX@developer.gserviceaccount.com'
    
    # OBTAIN THE KEY FROM THE GOOGLE APIs CONSOLE
    # More instructions here: http://goo.gl/w0YA0
    f = file('key.p12', 'rb')
    key = f.read()
    f.close()
    
    credentials = SignedJwtAssertionCredentials(
        SERVICE_ACCOUNT_EMAIL,
        key,
        scope='https://www.googleapis.com/auth/bigquery')
    
    http = httplib2.Http()
    http = credentials.authorize(http)
    
    service = build('bigquery', 'v2')
    datasets = service.datasets()
    response = datasets.list(projectId=PROJECT_NUMBER).execute(http)
    
    print 'Dataset list:'
    for dataset in response['datasets']:
      print '%s' % dataset['datasetReference']['datasetId']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a noob question, but the simple answer is eluding me. I
This seems like it should have a simple solution but I can't seem to
This seems like a simple question, but I am having trouble finding the answer.
I apologize if this is a duh question. It seems like the answer should
This seems like a repeated question but i'm not able to get my answer.
This seems like a simple question, but it is difficult to search for. I
This seems like a simple question, but has proven to be difficult to find
This seems like it should be easy as pie, but I can't seem to
This seems like a pretty simple question, but I have not managed to find
It seems like a simple beginners question, but I'm unable to find an answer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.