invalid_client 401 error

9,439 views
Skip to first unread message

Jesse Johnson

unread,
May 12, 2014, 3:57:05 PM5/12/14
to google-ap...@googlegroups.com
Trying to setup GAM for the first time on my Mac for our companies domain.  Get past the service selection option in the CLI, it launches the browser, but i get the attached page with an invalid client error.  Tried using the nobrowser.txt file, and manually entering the link, but the same things happens.  Would really love to use this tool, thanks!
Screenshot 2014-05-12 15.52.34.png

Nathan Matarazzo

unread,
May 16, 2014, 12:40:08 PM5/16/14
to google-ap...@googlegroups.com
I had the same issue.  I followed this article - https://code.google.com/p/google-apps-manager/wiki/CreatingClientSecretsFile

However, the creation of *my* project was slow and I ended up selecting the default "API Project" that was already there.  I finally went back to "Projects" and saw the new project I had created there.  Re-created the Client ID, downloaded the new .json file, renamed it to client_secrets.json and copied to my GAM folder.

You can run gam oauth revoke just in case you've actually authorized your original .json file.  Then re-run gam info domain and it should run smoothly.

Jesse Johnson

unread,
May 16, 2014, 4:27:53 PM5/16/14
to google-ap...@googlegroups.com
Thanks Nathan, unfortunately I'm still getting the same error.  I did enable several services that weren't on before, but I'm still missing something.  When I read through the initial instructions, it says you should be asked to enter some domain information when you first launch gam, but I never see that.  it just goes right to the service selection option in Terminal, then I put in 21 and leave everything selected, and i'm taken to the page.  I imagine it's not getting a valid domain, but it's not asking for one either, what am I missing?

Andrew Clapham

unread,
Jul 24, 2014, 3:50:34 PM7/24/14
to google-ap...@googlegroups.com
nathan if you havent resolved, i had the same issue... i ended up going back and deleting my original project, and stepping through install instructions again and things worked out... https://code.google.com/p/google-apps-manager/wiki/CreatingClientSecretsFile

Eric Heidrich

unread,
Aug 20, 2014, 5:26:47 PM8/20/14
to google-ap...@googlegroups.com
I'm running into the same 401 error, but mine says:

Error: invalid_client

no application name

Anyone have any idea what I can do?  I tried recreating the client_secret.json file and still have the same problem.  If it helps, I'm using the 64 bit version of GAM on Windows 8 Pro 64bit OS.  


On Monday, May 12, 2014 2:57:05 PM UTC-5, Jesse Johnson wrote:

Michel Fasen

unread,
Aug 21, 2014, 3:39:31 AM8/21/14
to google-ap...@googlegroups.com
Before downloading the json file you need to go to "APIs & auth -> Consent screen" and complete the "Product name" field. It's an essential step missing from the documentation a long time now.

Nereida Bernal

unread,
Sep 23, 2014, 5:45:08 PM9/23/14
to google-ap...@googlegroups.com
Hi all, I tried everything you  suggested but I still get the error. I followed the steps carefully I don't know what else can I do.

401. That’s an error.

Error: invalid_client

no support email

Request Details

That’s all we know.


El contenido de este correo es confidencial y puede ser objeto de acciones legales.  Es dirigido solo para el o los destinatarios(s) nombrados anteriormente. Si no es mencionado como destinatario, no debe leer, copiar, revelar, reenviar o utilizar el contenido de este mensaje. Si ha recibido este correo por error, por favor notifique al remitente y proceda a borrar el mensaje y archivos adjuntos sin conservar copias.

The information contained in this e-mail is confidential and may also be subject to legal privilege.  It is intended only for the recipient(s) named above.  If you are not named as a recipient, you must not read, copy, disclose, forward or otherwise use the information contained in this email.  If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete the message and any attachments without retaining any copies.

Covenant Support

unread,
Oct 1, 2014, 8:49:21 PM10/1/14
to google-ap...@googlegroups.com
Very helpful.  Thanks.  Your solution solved my problem.

Sharon Barnard

unread,
Oct 6, 2014, 12:09:48 PM10/6/14
to google-ap...@googlegroups.com
Hi - I'm new to GAM and have had a similar issue.  I was logged into my PC as myself, not the Google Console super admin account.  When it's opening the browser, you need to enter the super admin credentials - as soon as I did that, the connection was made (completed) and I no longer received the 401 error.


On Monday, May 12, 2014 12:57:05 PM UTC-7, Jesse Johnson wrote:
Trying to setup GAM for the first time on my Mac for our companies domain.  Get past the service selection option in the CLI, it launches the browser, but i get the attached page with an invalid client error.  Tried using the nobrowser.txt file, and manually entering the link, but the same things happens.  Would really love to use this tool, thanks!

___________________________________

Anaheim Union High School District
E-mail Confidentiality Notice

This e-mail communication and any attachments, including documents, files, or previous e-mail messages, constitute electronic communications within the scope of the Electronic Communications Privacy Act, 18 U.S.C. § 2510 et seq. This e-mail communication may contain non-public, confidential or legally privileged information intended for the sole use of the designated recipient(s). The unauthorized and intentional interception, use, copy or disclosure of such information, or attempt to do so, is strictly prohibited and may be unlawful under applicable laws. 18 U.S.C. § 2511. If you have received this e-mail communication in error, please immediately notify the sender by return e-mail and delete the original e-mail from your system. 

Reply all
Reply to author
Forward
0 new messages