Google Drive PHP API - Simple File Upload Without Signing In -


i have been able simple-file-upload.php example script work, see here:

https://github.com/google/google-api-php-client/blob/master/examples/simple-file-upload.php

but i'm unable work out how can run without browse user having signed in google account.

i want server upload file without user interaction.

i've noticed other questions answers have been accepted after trying them out suspect api has changed , no longer work.

for example:

https://github.com/yannisg/google-drive-uploader-php

the token file created gdrive_token.php empty.

any advice appreciated. thanks.

edit: daimto i'm pretty sure need save refresh token issued after user has signed in. have used following:

$refreshtoken = $client->getrefreshtoken();

but returns nothing.

can obtaining , using refresh token in context of simple-file-upload.php linked above?


Comments