Google+ Platform - APIs for Google Apps

Google+ Domains API - FAQs


At what level is the Google+ Domains API rate limit applied? Is that at the application level or the per user level?
The Google+ Domains API has a daily per-project usage quota. This limit applies across all Google+ Domains that are using your application. To view your current quota, you can go the Google APIs Console's Quota Pane. If you are approaching your limit and need to request more, you can use the Request More link on the page. Within that daily quota, you can control a per-user limit, which can be identified by IP or custom unique string. See capping usage in the Google APIs Console.
I cannot seem to get Activities.insert to work, and keep getting HTTP 4XX errors. Why?
Check for the following issues:
  • Verify your OAuth client ID credentials in your application against the credentials in the API Access pane of the APIs Console to ensure that they are the same.
  • What scopes are you supplying? You must supply all of the scopes below in a space delimited-list for this call to succeed:
  • Activity inserts must be HTTP POST requests, not HTTP GET requests.
  • All posts to the Activities.insert method through the Google+ Domains API, must include the access.domainRestricted = "true" property.
If all of the above are checked, then try this activities.list command from a terminal, after replacing the OAuth access token and Google+ user ID:
curl -v -H "Content-Type: application/json" -H "Authorization: OAuth <access token for Google+ user>" -d "{'object':{'content':'Test message'},'access':{'items':[{'type' : 'domain'}],'domainRestricted':true}}" -X POST<userId>/activities/user
The <userId> is the ID of the Google+ user you are managing on behalf of the Google account from which the application completes the OAuth flow. If the OAuth process went properly, and your application is set up properly, the above will post a new Activity on your user's behalf, viewable only to the user. The curl command outputs a verbose log of its interaction with the servers and a JSON representation of the created activity post.
Are there particular IP addresses Google uses to send requests from? We have a firewall on our side, and we need to whitelist Google’s IP addresses.
The Google infrastructure is huge and we frequently make network changes or expansion. So if you need to configure your firewall, the best way is to open it up to Google's entire public address range. See: Google Public DNS server locations.
Why are some embedded videos linking to the activity attachment URL instead of playing when clicked?
Only videos hosted on specific domains, such as YouTube and Vimeo will play inline in the activity stream. Videos hosted on other domains will display the thumbnail which will link to the activity attachment URL for playing.
Is there a way to +1 a post or +1 a comment through the API?
Not at this time.
Is there a way to query the posts made by a user to a specific circle and see the resulting number of reshares or +1's filtered by that same circle?
First of all, this is different from Activities.listByCircle which returns all posts from any users in that circle. There's currently no method to support filtering by circle when listing activities for a profile, but if you list all of the activities created by that profile, you can determine which circles the activities have been shared to. They are listed in the access section and look something like this:
"access": {
  "restricted" : "true",
  "kind": "plus#acl",
  "items": [
      "type": "circle",
      "id": "5O19P5jyHF-Kger6Hmdhqaewv94Jii_9"
      "type": "person",
      "id": "1028058028172895"
You can then filter this list on the client side. After you have the desired list of activities, you can determine the +1's, comments and reshares by looking at the appropriate attributes of the activity. The following shows the applicable portions of the response:
"replies": {
  "totalItems": 0,
  "selfLink": ""
"plusoners": {
  "totalItems": 0,
  "selfLink": ""
"resharers": {
  "totalItems": 0,
  "selfLink": ""
How long do OAuth tokens last?
The OAuth 2.0 server-side flow returns two tokens: a short lived access token and a long lived refresh token. The access token lasts for about one hour. When the access token expires you can use the refresh token to request a new access token. The provided API client libraries will take care of the token refresh cycle for you automatically. Note that the refresh token does not have an expiration date but can become invalid in the following situations:
  • A user revokes permission from their Authorized Access to your Google Account page or from their Google+ Apps page.
  • The token is revoked programmatically.
  • There is currently a limit on the number of refresh tokens that can be active per client ID and user. When the limit is reached and a new token is requested, the oldest is silently dropped. In general, this is a problem where the same client ID might be used to repeatedly issue refresh tokens unnecessarily or if refresh tokens keeps getting generated and not saved properly.
Does the API provide audit capabilities for Google+ Domains?
We do not currently offer audit functionality for Domains using Google+. Google is aware of this key feature request. You can use the existing APIs to develop custom logic in your application based on information that you pull from a Domain. See examples in other FAQs in this section.
Does the API support moderation? For example, can I delete another user’s comment on my post or delete a users post?

The Google+ Domains API does not currently offer post or comment deletion.

Can I set a custom thumbnail, or title for my post with a link?

You can set a custom thumbnail for a post with a link but you cannot customize the title of the attached article. You can only choose a thumbnail from one that is listed in previewThumbs object that is returned from an activity preview request.

If the article you are posting is within an intranet that is not available to the Google crawler, you will not see a preview snippet. If you have content behind an authentication page or other non-public URL, you can consider two approaches:

  • Create a synopsis on the login page by rendering your login page with the appropriate snippet so that when the Google crawler retrieves the page it finds the necessary information to render the preview as you intended.
  • Create an image post and include the link and summary as the content of the post. The user will have to click the link rather than the image to navigate to your page.
How does sending API requests in batch affect the daily API quota consumption?

Each API call within a batch counts against your daily API quota allocation. So if your batch contains 1000 API calls, you would use up 1000 queries in your allocated daily quota.

How can I include a +mention in my post?

You can include either "+{profile or page id}" or "+{email address}" within the text of your post. Omit the braces {}. For example, "Hey +12345678, I need help with my TPS reports."

Does the API support removing the thumbnail of an article post as offered by the share box?
The API does not currently support this feature.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.