When I try to login to the link given by gdrive list, I'm brought to a page stating
```
Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.
Same
same
Only Dev can do the verification, specifically the GDrive Dev (Petter Rasmussen). So this tool unusable until it's verification process completes.
Same here!
Same here
same here
update, actually this like worked for me
Same here
Same
No need to compile from source, just create service account in google console and use --service-account option
No need to compile from source, just create service account in google console and use
--service-accountoption
@yarkm13 can you help us with this? Any further information on how to make it works are very appreciated.
@yarkm13 @quangpham
Guide for those not compiling from source:
~/.gdrive or /home/MYUSERNAME/.gdrive)gdrive --service-account [YOUR JSON KEY NAME HERE] about to test connectionFailed to get about: googleapi: Error 403: Access Not Configured. Drive API has not been used in project [PROJECT_ID] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfiguredNow the important bits is your Service Account have their own Google Drive space. This mean that if you upload file, it won't show up in your drive. To workaround this, your account need to create a shared folder with your service account email as the editor. See this Stackoverflow discussion: https://stackoverflow.com/questions/45492703/google-drive-api-oauth-and-service-account
Now to get the folder ID you can follow the tips from this blog: https://ploi.io/documentation/mysql/where-do-i-get-google-drive-folder-id
Use that folder id as parrent folder to store all of your files, and done! Your files now shows up!
IMPORTANT NOTE: There's an unmerged fix (#331) for changing ownership of files. For now GDrive util will throw error: 'Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden'
This will results in the files uploaded is owned by your service account.
Hope this helps.
@quangpham i think @nathanaelytj has explained completely. I was done the same
My personal Google account have much more Google Drive storage limit than the Service Account Free Google Drive space (16GB), is there any solution to link my personal account by Service Account OAuth?
Same issue. Any ETA when this is going to get fixed?
Duplicate of: https://github.com/gdrive-org/gdrive/issues/506
Issue still there. App still useless. The service account doesn't have enough space.
@JurajMa create directory in your main account and share it with service account email address. Now you need to point your service account to work with that directory.
@yarkm13 @quangpham
Guide for those not compiling from source:
- Create Service Account & Download the JSON Key. You can follow Offical Google Guide here: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
- Create GDrive Config directory (should be in
~/.gdriveor/home/MYUSERNAME/.gdrive)- Store JSON Key file in the GDrive Config directory (from Step 2) Tips: use easy name for JSON Key
- Run command
gdrive --service-account [YOUR JSON KEY NAME HERE] aboutto test connection- If error like this, follow the step 6-10. If error doesn't occur you can skip it:
Failed to get about: googleapi: Error 403: Access Not Configured. Drive API has not been used in project [PROJECT_ID] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
You should go to https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] as instructed.- After Enabling API, you should create credentials for GDrive API by click Create Credentials, and choose Google Drive API from 'Which API are you using?' drop down list.
- Choose Other UI from 'Where will you be calling the API from?' drop down list.
- Choose User Data from 'What data will you be accessing?'
- Click on 'What credentials do I need?' now you will be instructed to create OAuth Client ID (Next Step).
- Choose Other, fill name for OAuth Client ID, then click Create. Done, just click Ok, no need to store Client ID or Secret.
Now the important bits is your Service Account have their own Google Drive space. This mean that if you upload file, it won't show up in your drive. To workaround this, your account need to create a shared folder with your service account email as the editor. See this Stackoverflow discussion: https://stackoverflow.com/questions/45492703/google-drive-api-oauth-and-service-account
Now to get the folder ID you can follow the tips from this blog: https://ploi.io/documentation/mysql/where-do-i-get-google-drive-folder-id
Use that folder id as parrent folder to store all of your files, and done! Your files now shows up!IMPORTANT NOTE: There's an unmerged fix (#331) for changing ownership of files. For now GDrive util will throw error: 'Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden'
This will results in the files uploaded is owned by your service account.Hope this helps.
if follow this step, but command gdrive --service-account will throw an error like this
No valid arguments given, use 'gdrive help' to see available commands
how to solved it?
same issue as @hikmawanaz
same problem
@nathanaelytj
On step 10 I first need to set up "OAuth consent screen", and only after this I can create OAuth Client ID. But obviously, I can't do it because it requires organization / website / verification from google / etc. How can I avoid this?

UPD: I have several accounts, and when I clicked "set up consent screen" for some reason google switched my account, after switching back everything works.
btw, use "Internal" OAuth type, just create name for consent screen and it works finally
@yarkm13 @quangpham
Guide for those not compiling from source:
- Create Service Account & Download the JSON Key. You can follow Offical Google Guide here: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
- Create GDrive Config directory (should be in
~/.gdriveor/home/MYUSERNAME/.gdrive)- Store JSON Key file in the GDrive Config directory (from Step 2) Tips: use easy name for JSON Key
- Run command
gdrive --service-account [YOUR JSON KEY NAME HERE] aboutto test connection- If error like this, follow the step 6-10. If error doesn't occur you can skip it:
Failed to get about: googleapi: Error 403: Access Not Configured. Drive API has not been used in project [PROJECT_ID] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
You should go to https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] as instructed.- After Enabling API, you should create credentials for GDrive API by click Create Credentials, and choose Google Drive API from 'Which API are you using?' drop down list.
- Choose Other UI from 'Where will you be calling the API from?' drop down list.
- Choose User Data from 'What data will you be accessing?'
- Click on 'What credentials do I need?' now you will be instructed to create OAuth Client ID (Next Step).
- Choose Other, fill name for OAuth Client ID, then click Create. Done, just click Ok, no need to store Client ID or Secret.
Now the important bits is your Service Account have their own Google Drive space. This mean that if you upload file, it won't show up in your drive. To workaround this, your account need to create a shared folder with your service account email as the editor. See this Stackoverflow discussion: https://stackoverflow.com/questions/45492703/google-drive-api-oauth-and-service-account
Now to get the folder ID you can follow the tips from this blog: https://ploi.io/documentation/mysql/where-do-i-get-google-drive-folder-id
Use that folder id as parrent folder to store all of your files, and done! Your files now shows up!
IMPORTANT NOTE: There's an unmerged fix (#331) for changing ownership of files. For now GDrive util will throw error: 'Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden'
This will results in the files uploaded is owned by your service account.
Hope this helps.if follow this step, but command gdrive --service-account will throw an error like this
No valid arguments given, use 'gdrive help' to see available commands
how to solved it?
@hikmawanaz I found that the brew installation didn't have the --service-account global options available to it, but it did if I downloaded the binary and used that instead.
Once you'd uploaded files using a service account, how do you then pass ownership to your normal user account? I find it a bit odd having the owner and a service account.
@joemidi first create dir in your service account
./gdrive --service-account gdrive.json mkdir DIR_NAME
get object id of that dir
gdrive --service-account gdrive.json list
and grant permissions for your root account to that dir
gdrive --service-account gdrive.json share --role writer --type user --email 'YOUR_ACCOUNT_EMAIL' DIR_OBJECT_ID
Dont forget to setup sync to that dir, not in root
gdrive --service-account gdrive.json sync upload LOCAL_DIR_TO_UPLOAD DIR_OBJECT_ID --delete-extraneous
Bonus: wou will have extra 15Gb space on Google Drive (data stored by service account will not count in your root account)
@joemidi first create dir in your service account
./gdrive --service-account gdrive.json mkdir DIR_NAMEget object id of that dir
gdrive --service-account gdrive.json listand grant permissions for your root account to that dir
gdrive --service-account gdrive.json share --role writer --type user --email 'YOUR_ACCOUNT_EMAIL' DIR_OBJECT_IDDont forget to setup sync to that dir, not in root
gdrive --service-account gdrive.json sync upload LOCAL_DIR_TO_UPLOAD DIR_OBJECT_ID --delete-extraneousBonus: wou will have extra 15Gb space on Google Drive (data stored by service account will not count in your root account)
But doesn't this mean the folder I created is owned by the service account?
@joemidi according to gdrive help you also can grant owner role
./gdrive help share
Share file or directory
gdrive [global] share [options] <fileId>
global:
-c, --config <configDir> Application path, default: ~/.gdrive
--refresh-token <refreshToken> Oauth refresh token used to get access token (for advanced users)
--access-token <accessToken> Oauth access token, only recommended for short-lived requests because of short lifetime (for advanced users)
--service-account <serviceAccount> Oauth service account filename, used for server to server communication without user interaction (filename path is relative to config dir)
options:
--role <role> Share role: owner/writer/commenter/reader, default: reader
--type <type> Share type: user/group/domain/anyone, default: anyone
--email <email> The email address of the user or group to share the file with. Requires 'user' or 'group' as type
--domain <domain> The name of Google Apps domain. Requires 'domain' as type
--discoverable Make file discoverable by search engines
--revoke Delete all sharing permissions (owner roles will be skipped)
@joemidi also i think you can go opposite way: create directory in your root account and than grant permissions to it for service account. But I haven't tested that
@yarkm13 Yes, I ended up doing it this way, you can just share the folder via the web UI, the folder is my own ownership but each file is created by the service account.
I did notice that owner role was available on gdrive share but it seems like it needs PR https://github.com/gdrive-org/gdrive/pull/331 to be complete due to an error message
Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden
I forked this repository to https://github.com/ntechp/gdrive, merge gdrive-org#513, gdrive-org#270, gdrive-org#331
Download the merged source, build it with Go Lang Docker (https://hub.docker.com/_/golang). Use command docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:latest go build -v
All is in this non-official release note: https://github.com/ntechp/gdrive/releases/tag/2.1.0-0.0.1
and the binary goes: https://github.com/ntechp/gdrive/releases/download/2.1.0-0.0.1/gdrive-linux64
This fork temporarily fixes 3 probs:
I do hope someone maintain this repository, merge all the fixes (because some of the issues already fixed by community), and update the release.
@yarkm13 @quangpham
Guide for those not compiling from source:
- Create Service Account & Download the JSON Key. You can follow Offical Google Guide here: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
- Create GDrive Config directory (should be in
~/.gdriveor/home/MYUSERNAME/.gdrive)- Store JSON Key file in the GDrive Config directory (from Step 2) Tips: use easy name for JSON Key
- Run command
gdrive --service-account [YOUR JSON KEY NAME HERE] aboutto test connection- If error like this, follow the step 6-10. If error doesn't occur you can skip it:
Failed to get about: googleapi: Error 403: Access Not Configured. Drive API has not been used in project [PROJECT_ID] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
You should go to https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] as instructed.- After Enabling API, you should create credentials for GDrive API by click Create Credentials, and choose Google Drive API from 'Which API are you using?' drop down list.
- Choose Other UI from 'Where will you be calling the API from?' drop down list.
- Choose User Data from 'What data will you be accessing?'
- Click on 'What credentials do I need?' now you will be instructed to create OAuth Client ID (Next Step).
- Choose Other, fill name for OAuth Client ID, then click Create. Done, just click Ok, no need to store Client ID or Secret.
Now the important bits is your Service Account have their own Google Drive space. This mean that if you upload file, it won't show up in your drive. To workaround this, your account need to create a shared folder with your service account email as the editor. See this Stackoverflow discussion: https://stackoverflow.com/questions/45492703/google-drive-api-oauth-and-service-account
Now to get the folder ID you can follow the tips from this blog: https://ploi.io/documentation/mysql/where-do-i-get-google-drive-folder-id
Use that folder id as parrent folder to store all of your files, and done! Your files now shows up!IMPORTANT NOTE: There's an unmerged fix (#331) for changing ownership of files. For now GDrive util will throw error: 'Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden'
This will results in the files uploaded is owned by your service account.Hope this helps.
Thanks for this useful guide !
gdrive --service-account [YOUR JSON KEY NAME HERE] about command provides a positive return.
I also created dir in my service account and grant permissions for a root account to that dir, but unfortunately the issue remains : authentication needed when I launch any other gdrive command command (for ex : gdrive upload picture.png).
Have I forgotten something ?
For my case, each service account is limited to 16GB only. So I wasn't entitled to the unlimited quota of the Gsuite account.
@joemidi first create dir in your service account
./gdrive --service-account gdrive.json mkdir DIR_NAMEget object id of that dir
gdrive --service-account gdrive.json listand grant permissions for your root account to that dir
gdrive --service-account gdrive.json share --role writer --type user --email 'YOUR_ACCOUNT_EMAIL' DIR_OBJECT_IDDont forget to setup sync to that dir, not in root
gdrive --service-account gdrive.json sync upload LOCAL_DIR_TO_UPLOAD DIR_OBJECT_ID --delete-extraneousBonus: wou will have extra 15Gb space on Google Drive (data stored by service account will not count in your root account)
Thanks, it solved my problem
I forked this repository to https://github.com/ntechp/gdrive, merge #513, #270, #331
Download the merged source, build it with Go Lang Docker (https://hub.docker.com/_/golang). Use commanddocker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:latest go build -vAll is in this non-official release note: https://github.com/ntechp/gdrive/releases/tag/2.1.0-0.0.1
and the binary goes: https://github.com/ntechp/gdrive/releases/download/2.1.0-0.0.1/gdrive-linux64This fork temporarily fixes 3 probs:
- The OAuth Problem.
- The negative number for unlimited space for GSuite users.
- The transferOwnership Problem.
I do hope someone maintain this repository, merge all the fixes (because some of the issues already fixed by community), and update the release.
This method do help me. Thank you very much!
gdrive --service-account creds.json about properly shows my account information, but upon trying gdrive upload command, it prompt me to open an URL which redirect me to login into my account and halted by Sign in with Google temporarily disabled for this app again
Anything I missed?
I feel overwhelmed by all the steps required to make this work... and all the reports of failure just make me postpone it even more, mainly considering I can't even compile it. The "go" compiler wont accept anything I type, yes I am a "go noob", what is the "go" compile command? as the one at readme.md wont work :(, yes I installed the go-lang package, I am on linux.
So my question is, Why not just fix this:
"Sign in with Google temporarily disabled for this app"
"This app has not been verified yet by Google in order to use Google Sign In."
I mean, why not we join forces and beg google to verify this app!!!
Anyone knows how to do that? yes, the begging part...
(I found this tip tho: https://github.com/gdrive-org/gdrive/issues/533#issuecomment-593805931)
I mean, this app is great and should work "out of the box" and not require all these steps from noobs like me :/.
Obs.: I have it working without these steps on my desktop but fails on my notebook
@AquariusPower I gave up on gdrive and switched to rclone.
Much easier to setup with service account
@skeith
yeah, I am thinking on that too, as we dont know when gdrive will be properly fixed.
There are about 4 alternatives to gdrive.
I wanted gdrive because I made a script that 100% depends on it to do many things,
but may be I can replace it (and may be even what my script does with some other app).
thx on the tip :)
EDIT: I end up using this: https://github.com/odeke-em/drive#initializing, the best thing on it is that if you got very low quota (like 100MB/day) it will not try to synchronize, so you can just upload specific changes and use as little as possible of that horrible quota :)
@AquariusPower
I mean, why not we join forces and beg google to verify this app!!!
Anyone knows how to do that? yes, the begging part...
It's not a google problem. The developer needs to initiate the verification. The result is that "join forces" boils down to someone forking the project (several have done so already) and paying the fee.
Without someone paying the fee, you'll have to do everything to "become the developer" yourself (because you don't have to pay the fee if you're only using it yourself)
@AquariusPower
I mean, why not we join forces and beg google to verify this app!!!
Anyone knows how to do that? yes, the begging part...It's not a google problem. The developer needs to initiate the verification. The result is that "join forces" boils down to someone forking the project (several have done so already) and paying the fee.
Without someone paying the fee, you'll have to do everything to "become the developer" yourself (because you don't have to pay the fee if you're only using it yourself)
How much is the fee 馃槗
Offering my few cents :relaxed:
And requesting verification is free. The problem lies in creating App Home Page, App Privacy Policy, App Term of Service (App Term of Service marked as Optional by Google). Those legal things need to be present and tailored to fulfill Google Requirements before the app marked as verified.
Try backuptogoogle to compile gdrive with your own Google credential and auto backup on your server.
Most helpful comment
@yarkm13 @quangpham
Guide for those not compiling from source:
~/.gdriveor/home/MYUSERNAME/.gdrive)gdrive --service-account [YOUR JSON KEY NAME HERE] aboutto test connectionFailed to get about: googleapi: Error 403: Access Not Configured. Drive API has not been used in project [PROJECT_ID] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfiguredYou should go to https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=[PROJECT_ID] as instructed.
Now the important bits is your Service Account have their own Google Drive space. This mean that if you upload file, it won't show up in your drive. To workaround this, your account need to create a shared folder with your service account email as the editor. See this Stackoverflow discussion: https://stackoverflow.com/questions/45492703/google-drive-api-oauth-and-service-account
Now to get the folder ID you can follow the tips from this blog: https://ploi.io/documentation/mysql/where-do-i-get-google-drive-folder-id
Use that folder id as parrent folder to store all of your files, and done! Your files now shows up!
IMPORTANT NOTE: There's an unmerged fix (#331) for changing ownership of files. For now GDrive util will throw error: 'Failed to share file: googleapi: Error 403: The transferOwnership parameter must be enabled when the permission role is 'owner'., forbidden'
This will results in the files uploaded is owned by your service account.
Hope this helps.