Not able to view folders created using google api in google drive. I am using service account json to connect to google drive. I can see the files getting created using api but cannot view the folders created using api."
Connecting to google drive using service account
GoogleCredential cr = GoogleCredential
.fromStream(new FileInputStream(CREDENTIALS_FILE_PATH))
.createScoped(SCOPES);
GoogleCredential builder = new GoogleCredential.Builder()
.setTransport(HTTP_TRANSPORT)
.setJsonFactory(JSON_FACTORY)
.setServiceAccountScopes(SCOPES)
.setServiceAccountId(cr.getServiceAccountId())
`enter code here`
.setServiceAccountPrivateKey
(cr.getServiceAccountPrivateKey())
.setServiceAccountPrivateKeyId
(cr.getServiceAccountPrivateKeyId())
.setTokenServerEncodedUrl(cr.getTokenServerEncodedUrl())
.setServiceAccountUser(cr.getServiceAccountUser()).build();
======================================================================
Creating a folder using below API
File fileMetadata = new File();
fileMetadata.setName("TestFolder");
fileMetadata.setMimeType("application/vnd.google-
apps.folder");
File file1 =
service.files().create(fileMetadata).setFields("id,
name").execute();
I can see the folder ID getting created but when i login to google drive , there are no folders in the google drive