Movatterモバイル変換


[0]ホーム

URL:


Google APIs Client Library for Java

Overview
Setup 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, andyou do not need to worry about exchanging code for tokens.

For example:

@OverrideprotectedvoiddoGet(HttpServletRequestreq,HttpServletResponseresp)throwsIOException{AppIdentityCredentialcredential=newAppIdentityCredential(Arrays.asList(UrlshortenerScopes.URLSHORTENER));Urlshortenershortener=newUrlshortener.Builder(newUrlFetchTransport(),newJacksonFactory(),credential).build();UrlHistoryhistory=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. Thehelpers aim to:

Getting started

  1. Install the Google API Client Library for Java:
  2. Learn about usingOAuth 2.0 with the authorization code flow for Google App Engine applications.
  3. Learn about usingOAuth 2.0 with the Google App Engine Identity API.
  4. Take a look at theCalendar App Engine sample. This samplecombines our Java library and auth helpers to show you how to access end-userdata from within a Google App Engine web app. The sample also usesGWTfor the user interface.

[8]ページ先頭

©2009-2025 Movatter.jp