Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
The Google Account APIs allow third-party applications to get limited access to a user's Google accounts for certain types of activities. For example, you might want to enable your users to view and work with their Google data in your application, create mashups of data from multiple sources, or give your users the ability to add data to their Google service from your application. Alternatively, you might want to let users enter your application with their Google log-in.
The Google Authorization Service manages authentication, authorization, and access control to user accounts, subject to approval from the account holder. Google offers several account authorization APIs to accommodate different types of access. If you're a third-party application developer who wants to implement some type of access to a Google account, use this page to help determine which type of Account API is appropriate for what you need.
With Google's Federated Login API, web applications can hand off user authentication tasks to Google. This feature frees you up from having to manage log-in information and security measures, and also avoids forcing your users to set up yet another login account. When using Federated Login, your application does not handle any login information; on a successful login event, Google returns a persistent user identifier, which your application can use to recognize individual users, handle sessions, store user-specific data, etc. Federated Login is based on the open-source OpenID 2.0 protocol; you can use the same interface to accept logins from any OpenID provider. Federated Login is designed for web applications only. It is now available for users with Google Apps (hosted) accounts.
For help implementing a login solution, see Federated Login for Google Account Users.
Many Google services allow third-party access to user-generated data, such as Calendar or feed data, so long as access is granted by the user. This feature allows users to share and exchange data between their Google applications and third-party applications for a variety of purposes. Google supports several options for getting authorized access to a user's Google data, offering access to both web applications and installed applications.
For help determining which authorization API is right for you, continue on to Step 2.
If you want to do both login authentication AND get authorization to access user data, you can implement a hybrid version of Google Federated Login combined with OAuth. The primary advantage of using the hybrid protocol is that it streamlines the user's authentication/authorization experience into a single step. OAuth requires additional security for access authorization over other authorization APIs supported by Google; for example, web applications using OAuth must register with Google. If you need to use a different authorization solution, such as one with more relaxed security requirements, you'll need to implement authentication and authorization as separate processes; in that scenario, users would need to grant access on two separate Google request pages.
For help implementing the hybrid solution, see Implementing OAuth with Federated Login on the Federated Login page.
Web applications that need authorized access to services protected by a user's Google or Google Apps (hosted) account can choose between either the Google-proprietary AuthSub API, and Google's implementation of the open standard OAuth API. Many--but not all--Google services support both APIs; check with the service you want to access to verify which APIs it supports.
Factors to keep in mind when choosing between OAuth and AuthSub authorization:
For help implementing authentication for a web-based application, see either of these pages:
An "installed application" is defined here as installed on a machine such as a desktop computer or a mobile device. As with web applications, third-party installed applications can benefit from exchanging data with users' Google services. Installed application developers can use either a Google-proprietary ClientLogin API, or Google's implementation of the OAuth API for installed applications.
Factors to keep in mind when choosing between OAuth and ClientLogin authorization:
For help implementing authentication for installed applications, see either of these pages:
