Category : google-drive-api

How are you? Hope you all fine. I’m going to try image upload to my google drive using google drive API every thing is going to good i install composer.json file successfully through composer require google/apiclient:^2.0 and i download the credentials.json successfully but the problem is that when i’m going to Generating Access Token through ..

Read more

when I try to want access the token the verification code is not working and they give me error undefined constant "STDIN" im new here in google API so please help me what’s I do? Thanks if ($client->isAccessTokenExpired()) { // Refresh the token if possible, else fetch a new one. if ($client->getRefreshToken()) { $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken()); } ..

Read more

I want to list files and its permissions by this API https://developers.google.com/drive/api/v3/reference/files/list When I set fields to * or explicitly set files(id,name,description,mimeType,parents,trashed, permissions/*)) files(id,name,description,mimeType,parents,trashed, permissions(*)) files(id,name,description,mimeType,parents,trashed, permissions/emailAddress) I will never receive permissions. I am getting this: { "id": "abc123" "name": "Name of file", "mimeType": "application/vnd.google-apps.folder", "trashed": false, "parents": [ "abc1234" ] } Also, I have ..

Read more

I use the following code to upload mp4 files from the server to Google Drive: // vars $path = FCPATH . ‘/assets/files/test/’; $filename = $video[‘recording_id’]. ‘.’ . strtolower($video[‘file_type’]); $mimeType = get_mime_by_extension($filename); $destination = $path . $filename; // chunk size $chunkSizeBytes = 1 * 1024 * 1024; // service $file2 = new Google_Service_Drive_DriveFile(); $file2->setParents(array($folder_topic)); $file2->setName($filename); $file2->setMimeType($mimeType); ..

Read more

We are using the technique described here to create a refresh token to use Google drive and store it in a config setting for production https://github.com/ivanvermeyen/laravel-google-drive-demo/blob/master/README/2-getting-your-refresh-token.md Once we get the refresh token, we use the 3 items client_id, secret_token and refresh_token inside this library to write files into Google Drive and it has been working ..

Read more