Google Auth Library for httplib2

raw JSON →
0.3.0 verified Tue May 12 auth: no python install: verified quickstart: stale

A transport for Google Authentication Library using httplib2. The current version is 0.3.0, released on 2025-12-12. The library has a regular release cadence with updates to support new Python versions.

pip install google-auth-httplib2
error ModuleNotFoundError: No module named 'google_auth_httplib2'
cause This error occurs when the 'google-auth-httplib2' package is not installed in the Python environment, or if there's an environment conflict (e.g., with Google App Engine's bundled 'google' module).
fix
Ensure the package is installed using pip: pip install google-auth-httplib2. If on App Engine, ensure correct vendoring or environment configuration to resolve module path conflicts.
error ValueError: Credentials from google.auth specified, but google-api-python-client is unable to use these credentials unless google-auth-httplib2 is installed. Please install google-auth-httplib2.
cause The `google-api-python-client` library requires `google-auth-httplib2` to be installed when authenticating with `google-auth` credentials, as it provides the necessary HTTP transport.
fix
Install the required transport library: pip install google-auth-httplib2.
error AttributeError: 'Credentials' object has no attribute 'authorize'
cause This error typically arises when using `google-auth` credentials with an older version of `google-api-python-client` or code expecting `oauth2client` style credentials, which had an `authorize` method. `google-auth-httplib2` acts as a bridge for `google-auth` credentials to work with `google-api-python-client`'s expectations.
fix
Ensure google-auth-httplib2 is installed: pip install google-auth-httplib2. Also, verify google-api-python-client is up-to-date: pip install --upgrade google-api-python-client.
error httplib2 transport does not support per-request timeout. Set the timeout when constructing the httplib2.Http instance.
cause This message, often a warning, indicates that a per-request timeout was attempted with a version of `google-auth` that doesn't propagate it correctly to the `httplib2` transport. The timeout needs to be set directly on the `httplib2.Http` instance used by `google-auth-httplib2`.
fix
When initializing httplib2.Http, pass the timeout argument, for example: http = httplib2.Http(timeout=30). Then use this http instance when creating google.auth.transport.httplib2.AuthorizedHttp.
breaking Requires httplib2 >= 0.19.0 and < 1.0.0 from version 0.2.1.
fix Upgrade httplib2 to a compatible version.
deprecated Older versions of this library may use deprecated imports.
fix Use the updated import paths.
breaking The `requests` library, a dependency for Google authentication transport, is missing, leading to `ImportError: No module named 'requests'`.
fix Ensure the `requests` package is installed (e.g., `pip install requests`). If this library uses `google-auth` and its requests transport, confirm that `requests` is included in your project's dependencies or install `google-auth[requests]`.
breaking The library failed with a ModuleNotFoundError for 'requests', indicating that the 'requests' package, a required dependency for 'google.auth.transport.requests', is not installed.
fix Ensure the 'requests' library is installed in the environment (e.g., 'pip install requests').
python os / libc status wheel install import disk
3.10 alpine (musl) - - 0.37s 39.2M
3.10 slim (glibc) - - 0.28s 40M
3.11 alpine (musl) - - 0.49s 42.4M
3.11 slim (glibc) - - 0.42s 43M
3.12 alpine (musl) - - 0.45s 34.0M
3.12 slim (glibc) - - 0.43s 34M
3.13 alpine (musl) - - 0.42s 33.6M
3.13 slim (glibc) - - 0.42s 34M
3.9 alpine (musl) - - 0.31s 39.5M
3.9 slim (glibc) - - 0.28s 40M

This quickstart shows you how to use AuthorizedHttp with Google Authentication Library.

import os
from google.auth.transport.requests import Request
from google_auth_httplib2 import AuthorizedHttp

credentials = ... # Obtain your credentials here
http = AuthorizedHttp(credentials)