Google+ Platform

Moments: remove

Requires authorization

Delete a moment that your app has written for the authenticated user. Try it now or see an example.

Request

HTTP request

DELETE https://www.googleapis.com/plus/v1/moments/id

Parameters

Parameter name Value Description
Path parameters
id string The ID of the moment to delete.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/plus.login 

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.

Examples

Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).

Java

Uses the Java client library

// This sample assumes a client object has been created.
// To learn more about creating a client, check out the starter:
//  https://developers.google.com/+/quickstart/java

// This example removes a moment that this app previously wrote for the authorized user.
String id = "moment-id";
service.moments().remove(id).execute();

.NET

Uses the .NET client library

// This sample assumes a client object has been created.
// To learn more about creating a client, check out the starter:
//  https://developers.google.com/+/quickstart/csharp

MomentsResource.RemoveRequest removeRequest = new MomentsResource.RemoveRequest(plusService, activityID);
removeRequest.Fetch();

PHP

Uses the PHP client library

# This sample assumes a client object has been created.
# To learn more about creating a client, check out the starter:
#  https://developers.google.com/+/quickstart/php

# This example removes a moment that this app previously wrote for the authorized user.
$id = "moment-id";
$plus->moments->remove($id);

Python

Uses the Python client library

# This sample assumes a client object has been created.
# To learn more about creating a client, check out the starter:
#  https://developers.google.com/+/quickstart/python

# This example removes a moment that this app previously wrote for the authorized user.
id = 'moment-id'
service.moments().remove(id=id).execute()

JavaScript

Uses the JavaScript client library

// This sample assumes a client object has been created.
// To learn more about creating a client, check out the starter:
//  https://developers.google.com/+/quickstart/javascript
var request = gapi.client.plus.moments.remove({
'id' : momentId }); request.execute(function(resp) { console.log(resp); });

Try it!

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

IMPORTANT! The APIs Explorer below does not currently work. It returns a "401 Unauthorized" error. The method itself works, but this explorer does not pass in the required data-requestvisibleactions. This is a known bug that we plan to fix.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.