The photos space will sunset in early January 2018. Your users can continue to access Google Photos via the drive space by enabling the Google Photos folder in My Drive in the Drive client settings

Apps: get

Requires authorization

Gets a specific app. Try it now or see an example.


HTTP request



Parameter name Value Description
Path parameters
appId string The ID of the app.


This request requires authorization with at least one of the following scopes (read more about authentication and authorization).


Request body

Do not supply a request body with this method.


If successful, this method returns an Apps 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 an app's metadata.
   * @param service Drive API service instance.
   * @param appId ID of the file to print metadata for.
  private static void printApp(Drive service, String appId) {

    try {
      App app = service.apps().get(appId).execute();

      System.out.println("Name: " + app.getName());
      System.out.println("Object type: " + app.getObjectType());
      System.out.println("Product URL: " + app.getProductUrl());
    } 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 an app's metadata.
  /// </summary>
  /// <param name="service">Drive API service instance.</param>
  /// <param name="appId">ID of the app to print metadata for.</param>
  public static void printApp(DriveService service, String appId) {
    try {
      App app = service.Apps.Get(appId).Execute();

      Console.WriteLine("Name: " + app.Name);
      Console.WriteLine("Object type: " + app.ObjectType);
      Console.WriteLine("Product URL: " + app.ProductUrl);
    } catch (Exception e) {
      Console.WriteLine("An error occurred: " + e.Message);

  // ...



Uses the PHP client library.

 * Print an app's metadata.
 * @param Google_Service_Drive $service Drive API service instance.
 * @param string $appId ID of the app to print metadata for.
function printApp($service, $appId) {
  try {
    $app = $service->apps->get($appId);

    print "Name: " . $app->getName();
    print "Object type: " . $app->getObjectType();
    print "Product URL: " . $app->getProductUrl();
  } catch (Exception $e) {
    print "An error occurred: " . $e->getMessage();


Uses the Python client library.

from apiclient import errors
# ...

def print_app(service, app_id):
  """Print an app's metadata.

    service: Drive API service instance.
    app_id: ID of the app to print metadata for.
    file = service.apps().get(appId=app_id).execute()

    print 'Name: %s' % app['name']
    print 'Object type: %s' % app['objectType']
    print 'Product URL: %s' % app['productUrl']
  except errors.HttpError, error:
    print 'An error occurred: %s' % error


Uses the Go client library.

import (

// PrintApp fetches and displays information about the given app.
func PrintApp(d *drive.Service, appId string) error {
  f, err := d.Apps.Get(appId).Do()
  if err != nil {
    fmt.Printf("An error occurred: %v\n", err)
    return err
  fmt.Printf("Name: %v", f.Name)
  fmt.Printf("Object type: %v", f.ObjectType)
  fmt.Printf("Product URL: %v", f.ProductUrl)
  return nil


Uses the JavaScript client library.

 * Print an app's metadata.
 * @param {String} appId ID of the app to print metadata for.
function printApp(appId) {
  var request ={
    'appId': appId
  request.execute(function(resp) {
    console.log('Name: ' +;
    console.log('Object type: ' + resp.objectType);
    console.log('Product URL: ' + resp.productUrl);


Uses the Objective-C client library.

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

+ (void)printAppMetadataWithService:(GTLServiceDrive *)service
                              appId:(NSString *)appId {
  GTLQuery *query = [GTLQueryDrive queryForAppsGetWithAppId:appId];

  // queryTicket can be used to track the status of the request.
  GTLServiceTicket *queryTicket =
    [service executeQuery:query
        completionHandler:^(GTLServiceTicket *ticket, GTLDriveApp *app,
                            NSError *error) {
        if (error == nil) {
          NSLog(@"Name: %@",;
          NSLog(@"Object type: %@", app.objectType);
          NSLog(@"Product URL: %@", app.productUrl);
        } else {
          NSLog(@"An error occurred: %@", error);

Try it!

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

Send feedback about...

Drive REST API v2
Drive REST API v2