The Mirror API allows you to subscribe to notifications that are sent when the user takes specific actions on a timeline item or when the user location has been updated.
For a list of methods for this resource, see the end of this page.
Resource representations
A subscription to events on a collection.
{ "kind": "mirror#subscription", "id":string , "updated":datetime , "collection":string , "operation": [string ], "callbackUrl":string , "verifyToken":string , "userToken":string , "notification": { "collection":string , "itemId":string , "operation":string , "userActions": [ { "type":string , "payload":string } ], "verifyToken":string , "userToken":string } }
Property name | Value | Description | Notes |
---|---|---|---|
callbackUrl |
string |
The URL where notifications should be delivered (must start with https:// ). |
writable |
collection |
string |
The collection to subscribe to. Allowed values are:
|
writable |
id |
string |
The ID of the subscription. | |
kind |
string |
The type of resource. This is always mirror#subscription . |
|
notification |
nested object |
Container object for notifications. This is not populated in the Subscription resource. |
|
notification.collection |
string |
The collection that generated the notification. | |
notification.itemId |
string |
The ID of the item that generated the notification. | |
notification.operation |
string |
The type of operation that generated the notification.
Acceptable values are:
|
|
notification.userActions[] |
list |
A list of actions taken by the user that triggered the notification. | |
notification.userActions[].payload |
string |
An optional payload for the action. For actions of type CUSTOM , this is the ID of the custom menu item that was selected. |
|
notification.userActions[].type |
string |
The type of action. The value of this can be:
|
|
notification.userToken |
string |
The user token provided by the service when it subscribed for notifications. | |
notification.verifyToken |
string |
The secret verify token provided by the service when it subscribed for notifications. | |
operation[] |
list |
A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are:
|
writable |
updated |
datetime |
The time at which this subscription was last modified, formatted according to RFC 3339. | |
userToken |
string |
An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. | writable |
verifyToken |
string |
A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. | writable |