I broke GAM by accident - GAMADV-XTD3 6.71.12

594 views
Skip to first unread message

Test Account

unread,
Mar 7, 2024, 6:51:02 AM3/7/24
to GAM for Google Workspace
Hi, 

Long story short, I messed up somewhere and I decided to delete gam. I think I didnt do it correct. Therefore when I reinstalled gam and it asked me to select the scopes and then took me to another page i got the attached error 400.

And to top it all off i dont have this oauth2 thing.

WARNING: Config File: /Users/djtesting/.gam/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/djtesting/.gam/oauth2.txt, Not Found

ERROR: /Users/djtesting/.gam/oauth2service.json already exists. Please delete or rename it before attempting to Use project.

I really made a mess of it and do not know how to fix it. 

I am currently in EU timezone.

Thanks in advance,

DJ

Screenshot 2024-03-07 at 12.46.28.png

Brian Kim

unread,
Mar 7, 2024, 7:26:25 AM3/7/24
to GAM for Google Workspace

Test Account

unread,
Mar 7, 2024, 8:30:43 AM3/7/24
to GAM for Google Workspace
Hi, I just tried that now, I am getting a different error now.

WARNING: Config File: /Users/djtesting/.gam/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/djtesting/.gam/oauth2.txt, Not Found

ERROR: No Client Access allowed


The command I used was gam user project testing...@gmail.com dj-testing-gam-00000

Thanks in advance for the help.



Brian Kim

unread,
Mar 7, 2024, 8:44:18 AM3/7/24
to google-ap...@googlegroups.com
Check the contents of your .gam directory referenced in the error message. If the JSON files are not there, go to 


Find section OAuth 2.0 Client ID and download the client secret and save as client_secrets.json

Find section Service Account and click on the service account, if one doesn't exist, create one. 
Create new key and download it as JSON and save as oauth2service.json

Save client_secrets.json and oauth2service.json to your .gam directory.

Do gam oauth create to create your oauth2.txt


--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/A2Tt10d682s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/b4ab83c8-467f-4864-944c-5b5958b69860n%40googlegroups.com.

Test Account

unread,
Mar 7, 2024, 9:22:44 AM3/7/24
to GAM for Google Workspace
i think i really messed it up for real. i deleted the oauth 2.0 stuff. and all of that stuff there. I think gam thinks that the project still exists but it doesnt i dont know how to change it either. so i cant really get the client secret since i stupidly deleted the oauth stuff.

i created this new dj-gam project though. the second pic shows all that i have in my gam folder. when i tried to delete the gam project i get the third screenshot. i then tried to do gam oauth create and pressed c and then get the first screenshot i sent at the start of this post.

DJ 
Screenshot 2024-03-07 at 15.14.01.png
Screenshot 2024-03-07 at 15.17.06.png
Screenshot 2024-03-07 at 15.11.21.png

Brian Kim

unread,
Mar 7, 2024, 9:50:08 AM3/7/24
to GAM for Google Workspace
You need to look inside $HOME/.gam (the directory is hidden). screenshot is showing $HOME/bin/gamadv-xtd3 

Test Account

unread,
Mar 7, 2024, 9:59:51 AM3/7/24
to GAM for Google Workspace
is it a good idea to delete this directory or just edit the json files with the correct details and put it back where it was?

I kinda want to delete it and just start over with gam

thoughts?

Screenshot 2024-03-07 at 15.59.36.png

Ross Scroggs

unread,
Mar 7, 2024, 10:12:18 AM3/7/24
to google-ap...@googlegroups.com
Send me a Meet/Zoom invitation and I'll help.

Ross
----
Ross Scroggs



You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/07aa26f3-853d-495b-87c8-75c29d1cff84n%40googlegroups.com.
<Screenshot 2024-03-07 at 15.59.36.png>

Reply all
Reply to author
Forward
0 new messages