geank / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Fusion table not shown on Google Drive, while created it using Service account withFusion API #889

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please help on the issue, where I create a Fusion table using Google Serive 
Account ie using key.p12, service account email, where service account 
activated for Fusion table. ( Refernce, Alejendro's great post, link: How to 
authenticate in Fusion tables with Oauth v2 )

During debug(Spring-maven project) - I do see the newly created table - Then, I 
insert rows data - Then, I see table with row data - Finally, I display table 
with with its complete data

At this point, table is created on Google Drive. I do see the network traffic 
ie xxx request/sec, meaning table is create, and I'm accessing it, hoping its 
created on my Google Drive, but NOT able to see it on Google Drive

So as to download table from the Google Drive to my local machine, I definitely 
like to see it on my Google Drive and then download to my local machine I 
guess, table hidden under Google Drive or may be create at some other place, as 
network traffic shows me xxx request/sec, but not sure how to get it on the 
Google Drivce.

Been on this issue and hit the wall. Guru's please help...

Code as follows:

HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();

    // check for valid setup
    if (SERVICE_ACCOUNT_EMAIL.startsWith("Enter ")) {
      System.err.println(SERVICE_ACCOUNT_EMAIL);
      System.exit(1);
    }
    String p12Content = Files.readFirstLine(new File("key.p12"), Charset.defaultCharset());
    if (p12Content.startsWith("Please")) {
      System.err.println(p12Content);
      System.exit(1);
    }
    // service account credential (uncomment setServiceAccountUser for domain-wide delegation)
    GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)
        .setJsonFactory(JSON_FACTORY)
        .setServiceAccountId(SERVICE_ACCOUNT_EMAIL)
        .setServiceAccountScopes(FusiontablesScopes.FUSIONTABLES)
        .setServiceAccountPrivateKeyFromP12File(new File("key.p12"))
        // .setServiceAccountUser("user@example.com")
        .build();

    // set up global FusionTables instance
    fusiontables = new Fusiontables.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build();
    // run commands

    listTables();

    String tableId = createTable();

    insertData(tableId);

    ... ... ...
    ... ... ...

StackOverFlow link: 
http://stackoverflow.com/questions/24562979/fusion-table-not-shown-on-google-dri
ve-while-created-it-using-service-account-w

Original issue reported on code.google.com by lgfr...@gmail.com on 3 Jul 2014 at 8:49

GoogleCodeExporter commented 9 years ago
Edited the stackoverflow post to add tag 'google-drive-api', which should 
better assist you with this question.

Original comment by wonder...@google.com on 29 Dec 2014 at 10:26