Category : google-drive-api

I am trying to create a blank spreadsheet inside an existing folder (i.e. inside GOOGLE_DRIVE_FOLDER_ID) but my code seems to ignore the folder ID and keeps creating the blank spreadsheet in the root of my Google Drive instead of creating the blank file inside the folder as indicated by: $file->setParents(‘GOOGLE_DRIVE_FOLDER_ID’); Below is more code for ..

Read more

There a error when i try to copy file use google drive api. Is there a param that i lack? this the error i get : { "error":{ "errors":[ { "domain":"global", "reason":"fileIdNotUsable", "message":"The provided file ID is not usable.", "locationType":"other", "location":"file.id" } ], "code":400, "message":"The provided file ID is not usable." } } This my ..

Read more

I am trying to clear Trash using php and drive api v3. Code excutes with no error but trash in drive is not deleted. Here is my code please help me to fix this. Thanks For your time. if($_POST[‘trash’]) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.googleapis.com/drive/v3/files/trash?key=’.$token.’"); curl_setopt($ch, CURLOPT_HTTPHEADER, array( ‘Content-type: application/json’, ‘Authorization: Bearer ‘ . ..

Read more