I am using the Google Drive API in my web application. I completely removed the "Getting Started" file and added a couple folders about 5 days ago to the service accounts Google Drive that I am connecting to. But instead of the API returning current data (two folders), it returns old data (the "Getting Started.pdf" file).
Why is the API doing this? How can I use PHP to fix it? I prefer using the SDK functions over the URLs, just so you know.
The code that isn't working is
$pageToken = null;
do {
$response2 = $service->files->listFiles(array(
//'q' => "mimeType='application/vnd.google-apps.folder'",
'spaces' => 'drive',
'pageToken' => $pageToken,
'fields' => 'nextPageToken, files(id, name)',
));
foreach ($response2->files as $file2) {
echo "Found file: " . $file2->name . " " . $file2->id;
}
} while ($pageToken != null);