CARVIEW |
Select Language
HTTP/2 301
content-type: text/html; charset=utf-8
location: https://googleapis.github.io/google-api-java-client/google-app-engine.html
cache-control: private, max-age=2592000
pragma:
vary: Cookie
vary: Accept-Encoding
content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-i0nCzDiFs2+3Bl0gvnBHedIwwKdPTi' 'unsafe-eval'; frame-ancestors 'self' https://codeassist.google.com https://code-assist-free-tier.corp.google.com; report-uri https://csp.withgoogle.com/csp/devsite/v2
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 0
x-content-type-options: nosniff
expires: 0
content-encoding: gzip
x-cloud-trace-context: 85286d87f2a53b0573a407cc115f08d0
date: Wed, 15 Oct 2025 11:54:11 GMT
server: Google Frontend
content-length: 205
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Thu, 02 Oct 2025 03:27:03 GMT
access-control-allow-origin: *
etag: W/"68ddf107-1d82"
expires: Wed, 15 Oct 2025 09:45:38 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 98F5:283449:151744:19085E:68EF6AE9
accept-ranges: bytes
age: 0
date: Wed, 15 Oct 2025 11:54:11 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210097-BOM
x-cache: HIT
x-cache-hits: 0
x-timer: S1760529252.567875,VS0,VE312
vary: Accept-Encoding
x-fastly-request-id: bd7a64f4de2d9f034aeea24db372a18b4722a3f8
content-length: 2382
Running on Google App Engine | Google APIs Client Library for Java
Setup Instructions
Component Modules
Android
Google App Engine
Batching
Media Download
Media Upload
OAuth 2.0
Timeouts and Errors
Support
Google APIs Client Library for Java
OverviewSetup Instructions
Component Modules
Android
Google App Engine
Batching
Media Download
Media Upload
OAuth 2.0
Timeouts and Errors
Support
Running on Google App Engine
App Engine-specific helpers make quick work of authenticated calls to APIs, and you do not need to worry about exchanging code for tokens.
For example:
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
AppIdentityCredential credential =
new AppIdentityCredential(Arrays.asList(UrlshortenerScopes.URLSHORTENER));
Urlshortener shortener =
new Urlshortener.Builder(new UrlFetchTransport(), new JacksonFactory(), credential)
.build();
UrlHistory history = shortener.URL().list().execute();
...
}
Auth helpers
If you are building a web app that interacts with a user’s data via an OAuth 2.0-enabled API, we’ve created some helpers to assist you with the process. The helpers aim to:
- Simplify the process of obtaining access tokens
(
AuthorizationCodeFlow
). - Manage tokens, after they are obtained, by marking them as
PersistenceCapable
. - Simplify the process of making authenticated calls using the access token’s credential.
- Insulate you from the details of authentication when writing servlets.
Getting started
- Install the Google API Client Library for Java:
- Follow the download instructions and put the library jar files into your war/WEB-INF/lib directory.
- Alternatively, you can use Maven.
- Learn about using OAuth 2.0 with the authorization code flow for Google App Engine applications.
- Learn about using OAuth 2.0 with the Google App Engine Identity API.
- Take a look at the Calendar App Engine sample. This sample combines our Java library and auth helpers to show you how to access end-user data from within a Google App Engine web app. The sample also uses GWT for the user interface.