It looks to me like the APIs explorer currently will not work with writing app activity to Google because it isn't passing the requestvisibleactions field to the OAUTH2 flow. You can still do things manually as I'll describe below.
There are two things you need to do:
First, ensure that you are rendering the sign-in button with requestvisibleactions set for the app activity types you are inserting. The following example shows how you would render sign-in with the add activity:
<div id="gConnect">
<button class="g-signin"
data-scope="https://www.googleapis.com/auth/plus.login"
data-requestvisibleactions="http://schemas.google.com/AddActivity"
data-clientId="YOUR_CLIENT_ID"
data-callback="onSignInCallback"
data-theme="dark"
data-cookiepolicy="single_host_origin">
</button>
</div>
Next, you will need to construct and write the app activity. The following example shows this using JavaScript:
var payload = {
"target": {
"id" : "replacewithuniqueidforaddtarget",
"image" : "http://www.google.com/s2/static/images/GoogleyEyes.png",
"type" : "http://schema.org/CreativeWork",
"description" : "The description for the activity",
"name":"An example of AddActivity"
},
"type":"http://schemas.google.com/AddActivity",
"startDate": "2012-10-31T23:59:59.999Z"
};
var args = {
'path': '/plus/v1/people/me/moments/vault',
'method': 'POST',
'body': JSON.stringify(payload),
'callback': function(response) {
console.log(response);
}
};
gapi.client.request(args);
You can see a live demo here:
http://wheresgus.com/appactivitiesdemo
You can learn about all of the activity types from the documentation here:
https://developers.google.com/+/api/moment-types
Update
Note the live demo has been updated with the following code and you should not be directly calling gapi.client.request:
writeListenActivity: function(url){
var payload = {
"type": "http://schemas.google.com/ListenActivity",
}
if (url != undefined){
payload.target = { 'url' : url };
}else{
payload.target = {
"type": "http://schema.org/MusicRecording",
"id": "uniqueidformusictarget",
"description": "A song about missing one's family members fighting in the American Civil War",
"image": "https://developers.google.com/+/plugins/snippet/examples/song.png",
"name": "When Johnny Comes Marching Home"
};
}
this.writeAppActivity(payload);
},
writeAddActivity: function(url){
var payload = {
"type":"http://schemas.google.com/AddActivity",
"startDate": "2012-10-31T23:59:59.999Z"
};
if (url != undefined){
payload.target = {
'url' : 'https://developers.google.com/+/plugins/snippet/examples/thing'
};
}else{
payload.target = {
"id" : "replacewithuniqueidforaddtarget",
"image" : "http://www.google.com/s2/static/images/GoogleyEyes.png",
"type" : "http://schema.org/CreativeWork",
"description" : "The description for the activity",
"name":"An example of AddActivity"
};
}
this.writeAppActivity(payload);
},
writeAppActivity: function(payload){
gapi.client.plus.moments.insert(
{ 'userId' : 'me',
'collection' : 'vault',
'resource' : payload
}).execute(function(result){
console.log(result);
});
}
Of particular note is the gapi.client.plus.moments.insert code that replaces the gapi.client.request call.