gpt4 book ai didi

api - 如何处理 “App is temporarily blocked from logging in with your Google account” 屏障

转载 作者:行者123 更新时间:2023-12-03 18:58:01 32 4
gpt4 key购买 nike

我正在使用 gdrivegshell为了与我的 Google 帐户交互并下载文件,请获取他们的信息。
当我运行时:gdrive aboutgdown about ,我收到以下消息

Initializing system (/home/user/.gdrive)
Authentication needed
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=...... \
apps.googleusercontent.com&redirect_uri=....

Enter verification code:

之后,当我粘贴以 https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id= 开头的 URL 时,我不断收到以下错误消息在我的浏览器上: This app is temporarily blocked from logging in with your Google account .
enter image description here
==> 之前没有产生这个错误,我能够收到 verification code ,以便用于连接到我的帐户。
为了使用 gdrive是否有可能克服谷歌的这个障碍?或 gdown ?

生成token.json的例子,粘贴验证码后。
  "access_token": ".....",
"token_type": "Bearer",
"refresh_token": "1/....",
"expiry": "2020-12-21T02:..."
}

最佳答案

@tellowkrinkle 的 comment帮我解决问题。

Probably yes. I have the old binary and Google blocks it fromauthenticating, saying that it's dangerous and they blocked it for mysafety (thanks a lot). It looks like Google now requires you to letthem review applications that want to access sensitive informationthrough their API

If you want to use it for yourself, you will need to:

  1. Go to https://console.developers.google.com and create a new project for yourself
  2. Search for the Google Drive API in the search box at the top, and turn it on
  3. Click OAuth consent screen on the left and set it up.
    • Assuming your account isn't part of an organization, you'll have to say your app is for external users and in testing
    • In the required scopes section, add .../auth/docs and .../auth/drive (I'm not sure which needed, it's probably only one ofthose). This will probably not be available if you didn't complete (2)
    • Add the accounts you want to use with your copy of gdrive as testers of your app. Only these accounts will be able to use your copyof gdrive, so everyone will have to compile their own (unless someonegoes and gets theirs reviewed by Google)
  4. Click Credentials on the left, then Create Credentials, then OAuth client ID. The application type is Desktop app
  5. Copy the Client ID and Secret into handlers_drive.go lines 17 and 18 and compile the application

$ git clone https://github.com/prasmussen/gdrive.git
$ cd gdrive
$ nano handlers_drive.go
# Copy the Client ID and Secret into handlers_drive.go lines 17 and 18 and compile the application
$ mv ~/.gdrive/token_v2.json ~/.gdrive/token_v2.json.old
$ go get github.com/prasmussen/gdrive
$ go build -ldflags "-w -s"
$ cp gdrive $GOPATH/bin/gdrive
$ gdrive about
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=.....

Enter verification code:

指导:
  • TUTORIAL: How to get rid of 403 Errors
  • https://github.com/prasmussen/gdrive/issues/426#issuecomment-459150627
  • https://github.com/marufshidiq/gdrive-cli-builder
  • 关于api - 如何处理 “App is temporarily blocked from logging in with your Google account” 屏障,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65396850/

    32 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com