Changes: get

Stay organized with collections Save and categorize content based on your preferences.

Warning: This item is deprecated.

Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes. Try it now or see an example.


HTTP request



Parameter name Value Description
Path parameters
changeId string The ID of the change.
Optional query parameters
driveId string The shared drive from which the change is returned.
supportsAllDrives boolean Whether the requesting application supports both My Drives and shared drives. (Default: false)
supportsTeamDrives boolean Deprecated use supportsAllDrives instead. (Default: false)
teamDriveId string Deprecated use driveId instead.


This request requires authorization with at least one of the following scopes:


Some scopes are restricted and require a security assessment for your app to use them. For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.


If successful, this method returns a Changes resource in the response body.


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).


Uses the Java client library.


// ...

public class MyClass {

  // ...

   * Print a single Change resource information.
   * @param service Drive API service instance.
   * @param changeId ID of the Change resource to retrieve.
  private static void printChange(Drive service, String changeId) {
    try {
      Change change = service.changes().get(changeId).execute();

      System.out.println("Changed file ID: " + change.getFileId());
      if (change.getDeleted()) {
        System.out.println("File has been deleted");
      } else {
        File changedFile = change.getFile();
        System.out.println("Changed file Title: " + changedFile.getTitle());
    } catch (IOException e) {
      System.out.println("An error occurred: " + e);

  // ...


Uses the .NET client library.

using Google.Apis.Drive.v2;
using Google.Apis.Drive.v2.Data;

using System.Net;
// ...

public class MyClass {

  // ...

  /// <summary>
  /// Print a single Change resource information.
  /// </summary>
  /// <param name="service">Drive API service instance.</param>
  /// <param name="changeId">ID of the Change resource to retrieve.</param>
  public static void PrintChange(DriveService service, String changeId) {
    try {
      Change change = service.Changes.Get(changeId).Execute();

      Console.WriteLine("Changed file ID: " + change.FileId);
      if (change.Deleted.HasValue && (bool)change.Deleted) {
        Console.WriteLine("File has been deleted");
      } else {
        File changedFile = change.File;
        Console.WriteLine("Changed file Title: " + changedFile.Title);
    } catch (Exception e) {
      Console.WriteLine("An error occurred: " + e.Message);

  // ...


Uses the PHP client library.

 * Print a single Change resource information.
 * @param Google_Service_Drive $service Drive API service instance.
 * @param String $changeId ID of the Change resource to retrieve.
function printChange($service, $changeId) {
  try {
    $change = $service->changes->get($changeId);

    print "Changed file ID: " . $change->getFileId();
    if ($change->getDeleted()) {
      print "File has been deleted";
    } else {
      $changedFile = $change->getFile();
      print "Changed file Title: " . $changedFile->getTitle();
  } catch (Exception $e) {
    print "An error occurred: " . $e->getMessage();


Uses the Python client library.

from apiclient import errors
# ...

def print_change(service, change_id):
  """Print a single Change resource information.

    service: Drive API service instance.
    change_id: ID of the Change resource to retrieve.
    change = service.changes().get(changeId=change_id).execute()

    print 'Changed file ID: %s' % change['fileId']
    if change['deleted']:
      print 'File has been deleted'
      file = change['file']
      print 'Changed file Title: %s' % file['title']
  except errors.HttpError, error:
    print 'An error occurred: %s' % error


Uses the JavaScript client library.

 * Print a single Change resource information.
 * @param {String} changeId ID of the Change resource to retrieve.
function printChange(changeId) {
  var request ={
    'changeId': changeId
  request.execute(function(resp) {
    if (resp.deleted) {
      console.log('File has been deleted');
    } else {
      var file = resp.file;
      console.log('Changed file Title: ' + file.title);


Uses the Go client library.

import (

// PrintChange fetches and displays the change with the passed changeId
func PrintChange(d *drive.Service, changeId string) error {
  c, err := d.Changes.Get(changeId).Do()
  if err != nil {
    fmt.Printf("An error occurred: %v\n", err)
    return err
  fmt.Printf("Changed file ID: %v\n", c.FileId)
  if c.Deleted {
    fmt.Printf("File has been deleted\n")
  } else {
    fmt.Printf("Changed file Title: %v\n",  c.File.Title)
  return nil


Uses the Objective-C client library.

#import "GTLDrive.h"
// ...

+ (void)printChangeWithService:(GTLServiceDrive *)service
                      changeId:(NSString *)changeId {
  GTLQueryDrive *query = [GTLQueryDrive queryForChangesGetWithChangeId:changeId];
  // queryTicket can be used to track the status of the request.
  GTLServiceTicket *queryTicket =
    [service executeQuery:query
        completionHandler:^(GTLServiceTicket *ticket, GTLDriveChange *change,
                            NSError *error) {
          if (error == nil) {
            NSLog(@"Current user name: %@", change.fileId);

            if ([change.deleted boolValue]) {
              NSLog(@"File has been deleted");
            } else {
              GTLDriveFile *changedFile = change.file;
              NSLog(@"Changed file Title: %@", changedFile.title);
          } else {
            NSLog(@"An error occurred: %@", error);

// ...

Try it!

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