gam 401 The OAuth client was not found.

4,408 views
Skip to first unread message

SA Danny

unread,
Dec 29, 2016, 7:26:30 AM12/29/16
to GAM for G Suite
hi,
i'm getting an "401  Error: invalid_client The OAuth client was not found". when trying to install gam 4.03 on windows 7.

Steve Larsen

unread,
Dec 29, 2016, 10:09:43 AM12/29/16
to GAM for G Suite
we moved to linux :)

worked as expected

Rick Franz

unread,
Jan 4, 2017, 9:44:18 AM1/4/17
to GAM for G Suite
Danny, did you ever get this resolved?

I am running into the same issue with GAM 4.03 on Windows 7.  I installed GAM and when I go to run GAM for the first time with, "gam info user", I get the 401 error page.

Thanks,
Rick

Andrus Rähni

unread,
Jan 4, 2017, 10:53:02 AM1/4/17
to GAM for G Suite
Check that you didn't include spaces when copying client ID and any urls.

Happy new year!!

Andrus

Eric Burns-White

unread,
Jan 4, 2017, 10:57:01 AM1/4/17
to GAM for G Suite
I ran into this very problem yesterday. I ended up following these steps:
  • I uninstalled my old GAM install.
  • I made sure my Admin account was the only Google account I was logged into.
  • I created a new project, making sure I followed the current steps.
  • I made sure I had the new client and secret correct. In particular, make sure you don't have a leading or trailing space in either one. Highlight-copy-paste seems to like sticking those in.
  • I closed out of those windows and opened a fresh one before running oauth create
  • If you get OAuth to authorize, make sure you run the service account check afterward, to make sure all your scopes are properly showing up.
    • If not, go to the Google Admin console (Security > Advanced settings > Authentication > Manage API client access) and add any scopes to your client id as needed.
  • Profit!
You're apparently doing a new install, so you should have a fresh platform to work from. Good luck!

Steve - DynTech

unread,
Jan 4, 2017, 7:07:24 PM1/4/17
to GAM for G Suite
we moved to linux and it worked from there. we use c9.io to have a free linux instance with a nice IDE from any browser, device etc. 

Although, as I typed that I thought. Why not just keep it all in Google. Creating an 'empty' project in GCP will give you access to Google Cloud Shell where you can install GAM for an always accessible instance. 



You can then just pull up a console by going to: https://console.cloud.google.com/cloudshell?project=project-it-name

+KimNilsson

unread,
Jan 8, 2017, 5:44:53 PM1/8/17
to GAM for G Suite
Yes, that's an awesome way to get quick and versatile access to GAM where ever you are.
I set this up on a few domains just recently. You can use binary GAM, or the python source code, both works. I went with binary, to make the install nice and neat.

Yannick Biet

unread,
Feb 27, 2017, 10:19:22 AM2/27/17
to GAM for G Suite
The same here using latest 4.12 version with Windows 10.
I followed all setup steps but when going to the oauth authorization i got a google error message on my browser :

Error: invalid_client

The OAuth client was not found.



Error: invalid_client

The OAuth client was not found.

Request Details

Jay Lee

unread,
Feb 27, 2017, 10:23:04 AM2/27/17
to google-ap...@googlegroups.com
This is usually an indication that you entered the wrong client id during "gam create project". Check the client_id value in client_secrets.json and compare it to what's in console.developers.google.com or just start fresh and pay close attention to the instructions.

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/c68abcd0-5138-4749-8adc-2c8c34100531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jay

Yannick Biet

unread,
Feb 27, 2017, 10:32:44 AM2/27/17
to GAM for G Suite
Hi Jay thanks for your prompt feedback
Already started over fresh 6 times this afternoon it makes me crazy :)

I have this in the json file :

 "installed": {
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_secret": "(...)",
        "project_id": "gam-project-43k-t3j-aqp",



For me this is the same as the console.dev.google.com :



any other idea ?




Le lundi 27 février 2017 16:23:04 UTC+1, Jay Lee a écrit :
This is usually an indication that you entered the wrong client id during "gam create project". Check the client_id value in client_secrets.json and compare it to what's in console.developers.google.com or just start fresh and pay close attention to the instructions.

Jay

On Mon, Feb 27, 2017 at 10:19 AM Yannick Biet <yannic...@captivea.fr> wrote:
The same here using latest 4.12 version with Windows 10.
I followed all setup steps but when going to the oauth authorization i got a google error message on my browser :

Error: invalid_client

The OAuth client was not found.



Error: invalid_client

The OAuth client was not found.

Request Details

Le jeudi 29 décembre 2016 13:26:30 UTC+1, SA Danny a écrit :
hi,
i'm getting an "401  Error: invalid_client The OAuth client was not found". when trying to install gam 4.03 on windows 7.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
--

Jay

Jay Lee

unread,
Feb 27, 2017, 11:15:10 AM2/27/17
to GAM for G Suite
Hi Yannick,

  Can you email me directly the goo.gl short URL GAM is directing you to before you switch to the browser to authenticate? It should be listed in the console after opening the browser.

Jay

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.
--

Jay

Yannick Biet

unread,
Feb 28, 2017, 3:13:26 AM2/28/17
to GAM for G Suite
I emailed the link yesterday to Jay.
It helped me to point out that the URL was still using my first test project (the very first created on the first gam create project instruction)

So I ran into gam folder and found the problem (not really a bug but still something weird)


As I tested multiple times to create projects, the first time gam created a file named client_secrets.json
the second and following times, the former file was not deleted/replaced but gam created a new file client_secrets.json-gam-project-xxx-xxx-xxx was created instead

During the oauth permissions step, gam is always using the same file : the first client_secrets.json

As there's no instructions (in the setup process) while using gam create project to rename a file on the FS, I just had no idea it was necesseray !

Maybe the gam exe should rename the old file to a new name and only create new client_secrets.json files, else an instruction should tell the user to rename the file when using gam create project for a second time ! I think the exe can know that the current project settings are not inside the default file therefore it will be needed to rename it on FS before continuing ?

What do you think about that ?

Thanks Jay for your time !
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
--

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
--

Jay

Yannick Biet

unread,
Feb 28, 2017, 3:15:11 AM2/28/17
to GAM for G Suite
To be real clear : 

going to gam folder, deleting client_secrets.json and renaming client_secrets.json-gam-project-xxx-xxx-xxx to client_secrets.json works here for me.

Merima Sarotic

unread,
Mar 24, 2017, 1:03:25 PM3/24/17
to GAM for G Suite
This worked for me to but now I am getting Authentication has failed: invalid_clientUnauthorized error. UGH!

Ross Scroggs

unread,
Mar 24, 2017, 1:29:56 PM3/24/17
to google-ap...@googlegroups.com
Merima,

You need to delete oauth2.txt and then do: gam oauth create
You may also have to rename something like oauth2service.json-gam-project-xxx-xxx-xxx to oauth2service.json

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Merima Sarotic

unread,
Mar 24, 2017, 1:54:08 PM3/24/17
to GAM for G Suite
Thank you Ross that got me somewhere. :( Different error Authentication has failed: invalid_requestclient_secret is missing.
Any suggestions?

On Friday, March 24, 2017 at 10:29:56 AM UTC-7, Ross Scroggs wrote:
Merima,

You need to delete oauth2.txt and then do: gam oauth create
You may also have to rename something like oauth2service.json-gam-project-xxx-xxx-xxx to oauth2service.json

Ross
On Fri, Mar 24, 2017 at 10:03 AM, Merima Sarotic <mer...@rocklinusd.org> wrote:
This worked for me to but now I am getting Authentication has failed: invalid_clientUnauthorized error. UGH!

On Tuesday, February 28, 2017 at 12:15:11 AM UTC-8, Yannick Biet wrote:
To be real clear : 

going to gam folder, deleting client_secrets.json and renaming client_secrets.json-gam-project-xxx-xxx-xxx to client_secrets.json works here for me.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--

Ross Scroggs

unread,
Mar 24, 2017, 2:03:57 PM3/24/17
to google-ap...@googlegroups.com
Merima,

I need a directory listing of the folder with gam.

Please send to me privately at ross.s...@gmail.com.

Ross


On Fri, Mar 24, 2017 at 10:54 AM, Merima Sarotic <mer...@rocklinusd.org> wrote:
Thank you Ross that got me somewhere. :( Different error Authentication has failed: invalid_requestclient_secret is missing.
Any suggestions?

On Friday, March 24, 2017 at 10:29:56 AM UTC-7, Ross Scroggs wrote:
Merima,

You need to delete oauth2.txt and then do: gam oauth create
You may also have to rename something like oauth2service.json-gam-project-xxx-xxx-xxx to oauth2service.json

Ross
On Fri, Mar 24, 2017 at 10:03 AM, Merima Sarotic <mer...@rocklinusd.org> wrote:
This worked for me to but now I am getting Authentication has failed: invalid_clientUnauthorized error. UGH!

On Tuesday, February 28, 2017 at 12:15:11 AM UTC-8, Yannick Biet wrote:
To be real clear : 

going to gam folder, deleting client_secrets.json and renaming client_secrets.json-gam-project-xxx-xxx-xxx to client_secrets.json works here for me.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Ralph deGennaro

unread,
Apr 21, 2017, 1:13:41 PM4/21/17
to GAM for G Suite
Hello,

I was running into something very similar in error message.  I am using a Mac OS X laptop to setup a Linux VM.  The problem was that the "copy" button in for oauth client ID and secret had spaces at the beginning and end.  Once I pasted them into a text editor and copied them without the spaces, things are working again.

Best,
Rio


On Friday, March 24, 2017 at 2:03:57 PM UTC-4, Ross Scroggs wrote:
Merima,

I need a directory listing of the folder with gam.

Please send to me privately at ross.s...@gmail.com.

Ross

On Fri, Mar 24, 2017 at 10:54 AM, Merima Sarotic <mer...@rocklinusd.org> wrote:
Thank you Ross that got me somewhere. :( Different error Authentication has failed: invalid_requestclient_secret is missing.
Any suggestions?

On Friday, March 24, 2017 at 10:29:56 AM UTC-7, Ross Scroggs wrote:
Merima,

You need to delete oauth2.txt and then do: gam oauth create
You may also have to rename something like oauth2service.json-gam-project-xxx-xxx-xxx to oauth2service.json

Ross
On Fri, Mar 24, 2017 at 10:03 AM, Merima Sarotic <mer...@rocklinusd.org> wrote:
This worked for me to but now I am getting Authentication has failed: invalid_clientUnauthorized error. UGH!

On Tuesday, February 28, 2017 at 12:15:11 AM UTC-8, Yannick Biet wrote:
To be real clear : 

going to gam folder, deleting client_secrets.json and renaming client_secrets.json-gam-project-xxx-xxx-xxx to client_secrets.json works here for me.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--
Reply all
Reply to author
Forward
0 new messages