Subscribe to changes for a user

POST {{baseUrl}}/changes/watch?pageToken={{pageToken}}&driveId={{driveId}}&key={{key}}&oauth_token={{oauthToken}}

Subscribes to changes for a user. To use this method, you must include the pageToken query parameter.

Request Params

KeyDatatypeRequiredDescription
pageTokenstring(Required) The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
driveIdstringThe shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
includeCorpusRemovalsstringWhether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
includeItemsFromAllDrivesstringWhether both My Drive and shared drive items should be included in results.
includeLabelsstringA comma-separated list of IDs of labels to include in the labelInfo part of the response.
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response. Only 'published' is supported.
includeRemovedstringWhether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
includeTeamDriveItemsstringDeprecated use includeItemsFromAllDrives instead.
pageSizestringThe maximum number of changes to return per page.
restrictToMyDrivestringWhether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
spacesstringA comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
supportsAllDrivesstringWhether the requesting application supports both My Drives and shared drives.
supportsTeamDrivesstringDeprecated use supportsAllDrives instead.
teamDriveIdstringDeprecated use driveId instead.
altstringData format for the response.
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAn opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstringDeprecated. Please use quotaUser instead.

Request Body

{"address"=>"<string>", "expiration"=>"<int64>", "id"=>"<string>", "kind"=>"api#channel", "params"=>{"qui_9"=>"<string>", "adipisicing1"=>"<string>", "eu2"=>"<string>"}, "payload"=>"<boolean>", "resourceId"=>"<string>", "resourceUri"=>"<string>", "token"=>"<string>", "type"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;address&quot;:&quot;\u003cstring\u003e&quot;,&quot;expiration&quot;:&quot;\u003cint64\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;kind&quot;:&quot;api#channel&quot;,&quot;params&quot;:{&quot;qui_9&quot;:&quot;\u003cstring\u003e&quot;,&quot;adipisicing1&quot;:&quot;\u003cstring\u003e&quot;,&quot;eu2&quot;:&quot;\u003cstring\u003e&quot;},&quot;payload&quot;:&quot;\u003cboolean\u003e&quot;,&quot;resourceId&quot;:&quot;\u003cstring\u003e&quot;,&quot;resourceUri&quot;:&quot;\u003cstring\u003e&quot;,&quot;token&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;\u003cstring\u003e&quot;}