The Google+ Domains API allows Google Apps customers and ISVs to take advantage of enhanced Google+ APIs to build tools and services that can be used in a variety of ways.
The Google+ Domains API offers a number of additional features compared to the Google+ API v1, and differs in some key respects:
|Feature||Google+ API v1||Google+ Domains API|
|Read public posts||Yes||Yes, by users in the same Google Apps domain.|
|Read domain-restricted posts||No||Yes, by users in the same Google Apps domain.|
|Read posts limited to circles||No||Yes, you can read posts made by a user in the same Google Apps domain.|
|Read comments on a post||Yes, but only for comments on public posts.||Yes, but only for comments on posts made by a user in the same Google Apps domain.|
|Read the names of a user's circles and the membership of each circle||No||Yes|
|Read a merged list of the members of the user's circles with no circle information||
Yes, but only for the members of those circles that are selected by the
user during authentication when the
|Write posts to the stream||No||
Yes, restricted to the domain.
Photos and video can be uploaded for inclusion in posts.
|Write to a user's profile||No||No, cannot write to Google+ profiles with the Google+ Domains API. You can write to a user's Google Apps profile by using the Admin SDK Directory API. Updates made with the Directory API do not display in Google+, but might still be useful for your app.|
Accessing the APIs
Before you begin development, you should decide how you are going to access the Google+ Domains API. The following options are available with the API:
Users grant the app authorization to access the APIs on their behalf. This option follows your standard OAuth 2.0 flow where individual users are prompted to authorize your app and the app can use an access token to access the APIs on their behalf. Supports both client-side and server-side flows.
The domain admin grants the app authorization to act on behalf of users. This option uses a service account to access the APIs on behalf of any user within your Google Apps domain.
Your app is limited in the number of API calls it can make to each Google API service. It has two limits:
- Your app has daily per-project usage courtesy quota. This is the maximum number of requests per day your app can make to a service.
- Within the daily quota, you can rate-limit per user by setting the maximum number of requests/second per user. Users can be identified by IP address or a custom unique string.
You can request additional API quota once you have completed your app development, in preparation for your production rollout. The following procedure enables you to view the limits and to request additional quota for your app.
- Access your list of enabled APIs in the Google API Console . Log in using your developer account for the production app.
- From the project drop-down, select the project you previously created for your app.
- From the list of Enabled APIs, find the Google+ Domains API service in the list and select its name. This takes you to a details page.
Select the Quotas tab. This displays a page that
shows both the daily quota limit (requests/day) and the
per-user rate limit (requests/second/user).
- You can cap the requests per second for an individual user by setting limits per IP address or custom unique string. For more details, see capping usage in the Google API Console Help.
- To request more API quota, click the Apply for higher quota link, then fill out and submit the request form. Allow at least a full business week for your request to be processed.
As your production usage approaches the quota limit, you can request additional quota using the same process as above. You need to provide a full analysis of your current and future API usage for review to facilitate additional quota grants.
If you have more than one production project (for example, to segregate RSS-based traffic), please submit separate requests for each of the project IDs when requesting API quota increases.
Quickstart sample apps
The Google+ Domains API quickstart sample apps demonstrate performing basic operations on behalf of a user who authorized your app, such as authenticating with domain-wide delegation and then creating a new post on behalf of a specified user.
To run this app for yourself, choose your preferred language: