Legacy Google+ APIs have been shut down as of March 7, 2019. Changes to the shutdown plan have been made recently which may mitigate its effect on some developers. Learn more.

Google+ integrations for web and mobile apps have also stopped functioning as of March 7, 2019. Learn more.

Activities: insert

Requires authorization

Create a new activity for the authenticated user. Try it now.

Request

HTTP request

POST https://www.googleapis.com/plusDomains/v1/people/userId/activities

Parameters

Parameter name Value Description
Required parameters
userId string The ID of the user to create the activity on behalf of. Its value should be "me", to indicate the authenticated user.
Optional parameters
preview boolean If "true", extract the potential media attachments for a URL. The response will include all possible attachments for a URL, including video, photos, and articles based on the content of the page.

Authorization

To learn when scopes are required, see Google+ Domains scopes.

Scope
https://www.googleapis.com/auth/plus.stream.write
https://www.googleapis.com/auth/plus.me

Request body

In the request body, supply an activity resource with the following properties:

Property name Value Description Notes
Required Properties
object.originalContent string The content (text) as provided by the author, which is stored without any HTML formatting. When creating or updating an activity, this value must be supplied as plain text in the request.
Optional Properties
access nested object Identifies who has access to see this activity. writable
access.domainRestricted boolean Whether access is restricted to the domain. writable
access.items[] list The list of access entries. writable
access.items[].id string The ID of the entry. For entries of type "person" or "circle", this is the ID of the resource. For other types, this property is not set. writable
access.items[].type string The type of entry describing to whom access is granted. Possible values are:
  • "person" - Access to an individual.
  • "circle" - Access to members of a circle.
  • "myCircles" - Access to members of all the person's circles.
  • "extendedCircles" - Access to members of all the person's circles, plus all of the people in their circles.
  • "domain" - Access to members of the person's Google Apps domain.
  • "public" - Access to anyone on the web.
writable
annotation string Additional content added by the person who shared this activity, applicable only when resharing an activity. writable
object object The object of this activity. writable
object.attachments[] list The media objects attached to this activity. writable
object.attachments[].id string The ID of the attachment. writable
object.attachments[].url string The link to the attachment, which should be of type text/html. writable
object.id string The ID of the object. When resharing an activity, this is the ID of the activity that is being reshared. writable
verb string This activity's verb, which indicates the action that was performed. Possible values include, but are not limited to, the following values:
  • "post" - Publish content to the stream.
  • "share" - Reshare an activity.
writable

Response

If successful, this method returns an activity resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.

Send feedback about...

Google+ Domains API
Google+ Domains API