google / skicka

Command-line utility for working with Google Drive. Join the mailing list at https://groups.google.com/forum/#!forum/skicka-users.
Apache License 2.0
1.3k stars 118 forks source link

Cannot get OAuth #134

Open jtgd opened 5 years ago

jtgd commented 5 years ago
$ skicka ls
skicka: error creating Google Drive client: Get https://www.googleapis.com/drive/v2/about?alt=json: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}

$ skicka -no-browser-auth ls
skicka: error creating Google Drive client: Get https://www.googleapis.com/drive/v2/about?alt=json: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}

Nothing opens in browser.

Is there a workaround?

(Arch Linux aur/skicka r272.70827bf-1)

ardunn commented 4 years ago

I am having same issue

ClaraBing commented 4 years ago

I'm having the same issue too; it used to work before but gave this error today.

Update: I removed the cache files (~/.skicka*cache*) to sign in to my account again, and got this error message:

"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."

Looks like skicka is now disabled?

satackey commented 4 years ago

I have successfully logged in with an account that has used skicka. However, for new accounts that sign in to skicka, I received the error message "Sign in with Google temporarily disabled ...".

I think the cause is that the default credentials embedded in skicka have not passed Google's review. This was solved by creating your own credentials.

Here are the steps:

  1. Create a project on Google Cloud Plarform.
  2. Select API & Services->Library in the menu and enable Google Drive API.
  3. Select Create OAuth client ID and get Client ID and Client Secret.
  4. Comment out and rewrite clientid and clientsecret in the [google] section of .skicka.config.
mxdpeep commented 4 years ago

abandon skicka, use rclone

jtgd commented 4 years ago

Heh, thanks. Already did.

agoode commented 4 years ago

This is still a problem. I think the instructions here are still relevant: https://github.com/google/skicka/blob/9c807e9f5e3e66e9fa588511f058628ea5db89be/README.md

Please leave this issue open so people can find this workaround.

lukewys commented 3 years ago

Hi, @satackey , I wrote the clientid and clientsecret according to your instruction, but afterwards when I run skicka ls it still let me get the authorization. Is there anything that needs to perform after changing the config file? Thanks in advance.

lukewys commented 3 years ago

Hi, @satackey , I wrote the clientid and clientsecret according to your instruction, but afterwards when I run skicka ls it still let me get the authorization. Is there anything that needs to perform after changing the config file? Thanks in advance.

I succeeded. I clicked advance option in the link provided by skicka ls -no-browser-auth, and get the code.