GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.61k stars 206 forks source link

Gyb has not completed the Google verification process #473

Closed Suncatcher closed 1 month ago

Suncatcher commented 1 month ago

Full steps to reproduce the issue:

  1. Restoring the messages via command gyb --email newaddress@gmail.com --action restore --local-folder GYB-GMail-Backup-oldaddress@gmail.com --label-restored "Old Address"
  2. Confirming access via selection 7
    
    Select the actions you wish GYB to be able to perform for astashonok.p@gmail.com

[ ] 0) Gmail Backup And Restore - read/write mailbox access [ ] 1) Gmail Backup Only - read-only mailbox access [ ] 2) Gmail Restore Only - write-only mailbox access and label management [*] 3) Gmail Full Access - read/write mailbox access and message purge [ ] 4) No Gmail Access

[] 5) Groups Restore - write to G Suite Groups Archive [] 6) Storage Quota - Drive app config scope used for --action quota

3. Clicking direct link doesn't help either

Go to the following link in your browser:

    https://gyb-shortn.jaylee.us/z3bjrb

IMPORTANT: If you get a browser error that the site can't be reached AFTER you click the Allow button, copy the URL from the browser where the error occurred and paste that here instead.

Enter verification code or browser URL:

5. Popup window opens with this error
![image](https://github.com/user-attachments/assets/27d77abc-875b-4fa0-a515-75a4a437fe20)
Error details:

Request details: access_type=offline login_hint=user@mail.com response_type=code redirect_uri=http://127.0.0.1:8080/ state=pr6aKwrb13FZkiJ9cfX8oV8X4BXiPd code_challenge_method=S256 client_id=420949411682-upr33h07pdppm70furelb05gu4bhf4p3 code_challenge=0_xajwu4l0xv-N4JJRGOHhE1cT7r5RjE0Bb89GGwq_0 scope=https://www.googleapis.com/auth/userinfo.email https://mail.google.com/ https://www.googleapis.com/auth/apps.groups.migration https://www.googleapis.com/auth/drive.appdata openid flowName=GeneralOAuthFlow



Expected outcome (what are you trying to do?):
Consent window

Actual outcome (what errors or bad behavior do you see instead?):
Verification error

Another account working fine, this one throws errorr both in Incognito and regular browser window. I use MS Edge Version 127.0.2651.86 (Official build) (64-bit). Any suggestion what to check?
jay0lee commented 1 month ago

You created a project, now you need to mark it as trusted in your admin console. See:

https://support.google.com/a/answer/7281227?hl=en

Suncatcher commented 1 month ago

Thank you. Sorry for being slowpoke, but your link is about google workspace (admin.google.com), and my google account is personal. I thorouhly reinspected your help article and didn't find any clue about personal accounts. I found only this page https://myaccount.google.com/connections?filters=3 where they show third-party apps connected to my account and I don't see anything like "Make trusted" or similar. Checking GAM Project options by the above link I see very few controls over the project image

Suncatcher commented 1 month ago

Ok, I figured out the solution from here: the account must be added as test, I missed that step. This is described in the GYB wiki:

Important note: If you don't use Google Workspace, Google forces your project to be "External" i.e. Public. The project is in a test mode by default though, so your alternatives are:

Add your e-mail address to the test (under the option of "Users"). Publish the project so everyone can use it. You probably would want to avoid that option.

By the way marking app as trusted and adding user to test users is a different process, so your reply was a little bit misleading. Thanks anyway! Great app!

P.S. And this step not even has a dedicated chapter in the Wiki contents, it is placed into General section of the Running GYB for the first time, so it is kinda impossible to find it fast in the whole bunch of text. My opinion: the prerequisites for running the app must have dedicated chapter in the wiki.