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 8715943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:57:50+00:00 2026-06-13T05:57:50+00:00

This seems like relatively straightforward code accessing a Google API endpoint with a Service

  • 0

This seems like relatively straightforward code accessing a Google API endpoint with a Service Account- but I am getting Http Error 500

It works fine with the Tasks API, same authentication.

My source code:

import httplib2
import pprint
import sys

from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials

f = file('key.p12', 'rb')
key = f.read()
f.close()

credentials = SignedJwtAssertionCredentials(
'403695561042-6ntna04usrl5sscg3ovij6t4d8vfvsqp@developer.gserviceaccount.com',
key,
scope='https://www.googleapis.com/auth/apps.order.readonly')

http = httplib2.Http()
http = credentials.authorize(http)
service = build("reseller", "v1", http=http)
lists = service.subscriptions().list().execute(http=http) 
print lists

Response:

HttpError: <unprintable HttpError object>

Traceback:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/admin/Sites/newmind/reseller-api/app.py", line 79, in index
    lists = service.subscriptions().list().execute(http=http)
  File "build/bdist.macosx-10.8-intel/egg/oauth2client/util.py", line 120, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "build/bdist.macosx-10.8-intel/egg/apiclient/http.py", line 678, in execute
    raise HttpError(resp, content, uri=self.uri)

Copied the code directly from the Google Sample, just changed the name of the service and authentication.
http://code.google.com/p/google-api-python-client/source/browse/samples/service_account/tasks.py
The tasks API returns http 200 with the same credentials.

When I use a pretty standard httplib2 request, here’s the response I am getting:

WARNING:oauth2client.util:new_request() takes at most 1 positional argument (2 given)
    {'status': '500', 'content-length': '52', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'expires': 'Sat, 20 Oct 2012 06:25:19 GMT', 'server': 'GSE', '-content-encoding': 'gzip', 'cache-control': 'private, max-age=0', 'date': 'Sat, 20 Oct 2012 06:25:19 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json; charset=UTF-8'}
    {
     "error": {
      "code": 500,
      "message": null
     }
    }
  • 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-13T05:57:51+00:00Added an answer on June 13, 2026 at 5:57 am

    Somewhat of a long shot, but have you turned on the Reseller API in your project console? I remember having a similar issue when attempting to access a service other than the one I had initially used.

    Edit: Per the comments below, an alternative solution was to use the Flow and set the access_type to offline to allow the token to be refreshed without requiring the user to constantly reauthenticate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like it should be relatively straightforward, I cannot figure out what I'm
Okay, this seems like it should be relatively simple, but I've been Googling for
This seems like a repeated question but i'm not able to get my answer.
This seems like such a simple issue but I cannot find an elegant solution.
This seems like the simplest Git question, but I can't find ANYTHING on it.
This seems like a must have form input for a mobile ui framework, but
This seems like another fairly simple thing to do, but I'm again struggling on
This seems like I'm missing something obvious but I can't get redirects (>) to
This seems like it should be easy, but I can't quite find an explanation
This seems like it should be obvious but I can't figure it out. Suppose

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.