GetRefreshToken.php > Error: disabled_client The OAuth client was disabled.

2,699 views
Skip to first unread message

Jake Wilson

unread,
Feb 28, 2014, 5:50:34 PM2/28/14
to adwor...@googlegroups.com

I am building a simple web app to connect to our Adwords MMC and spit out some reports.

In the Google API Console I created a new Client ID.  I chose Installed Application even though this is a web-based PHP tool I'm making.  This page:


says to choose Installed Application if:
  • You are just getting started for the first time.
  • You want to test our example code and get started quickly.
  • You are managing all of your AdWords accounts using a single top level MCC.
All of which apply to us.  Also, the auth.ini says:

; If you do not have a client ID or secret, please create one of type
; "installed application" in the Google API console:

So anyways, I created an installed application client ID.  I get my Client ID and Client Secret.  I add these to auth.ini along with my Adwords API Key (which is approved) and a unique userAgentID string to identify my application.

At the command line I run the GetRefreshToken.php script, giving me:

Log in to your AdWords account and open the following URL:

I log into my Adwords account and then paste in the above URL.  I get this page:

So what am I doing wrong here?

Ray Tsang (AdWords API Team)

unread,
Mar 4, 2014, 2:40:28 PM3/4/14
to adwor...@googlegroups.com
Jake,

In the cloud console, could I trouble you to navigate to the Consent Screen configuration and enter an application name (and any of the other required fields).

Please let me know if it works for you - and I can update relevant documentations.

Thanks,

piotr.d...@bonito.pl

unread,
Apr 23, 2014, 8:35:36 AM4/23/14
to adwor...@googlegroups.com
Hello,
I have the same problem :(
Also filled field required in Consent screen, I have http error 400 and Error: disabled_client.
So what am I doing wrong here?
How enable OAuth client for me project ?

Thanks

piotr.d...@bonito.pl

unread,
Apr 23, 2014, 9:45:50 AM4/23/14
to adwor...@googlegroups.com
Now, I have other errro:

Error: redirect_uri_mismatch

The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI

So what am I doing wrong here?

Ray Tsang (AdWords API Team)

unread,
Apr 23, 2014, 11:53:44 AM4/23/14
to adwor...@googlegroups.com
Hi,

It's most likely that you've created an OAuth 2.0 "Web application".  Please review our AdWords OAuth 2.0 authentication guide.
In step 6, please select Installed application.

Thanks,

Ray

piotr.d...@bonito.pl

unread,
Apr 24, 2014, 9:11:49 AM4/24/14
to adwor...@googlegroups.com
Thanks, everything works well !

Ray Tsang (AdWords API Team)

unread,
Apr 24, 2014, 11:08:06 AM4/24/14
to adwor...@googlegroups.com
Sounds great.  Glad it helped.

Cheers,

Ray

Sarah Gilmore

unread,
Jul 16, 2014, 9:20:58 AM7/16/14
to adwor...@googlegroups.com
Hi, I am having the same issue as Jake (above). I'm using the PHP client library to run the script on the command line, but when I paste the url, it says 'the oauth client is disabled'.( I can get it to go one step further by pasting in my client id into the url, as the url created by GetRefreshToken seems to use a different id, but after I enter the code provided into the command line I still get the same message.)

I have the app set as installed and have set the name, url and logo in the console consent screen.

I am using a test account and an unapproved developer token. The token was created about a year ago, could this be the issue?

I am also wondering whether the test account is a valid test account but without connecting to the API its difficult to test this.

Thanks!

Ray Tsang (AdWords API Team)

unread,
Jul 16, 2014, 2:56:32 PM7/16/14
to adwor...@googlegroups.com
Sarah,

Could I trouble you to send me the exact errors that you've received?  The authorization code is long (it sometimes doesn't fully display in the text box) - please make sure the entire string is selected and pasted.

Thanks,

Ray

Sarah Gilmore

unread,
Jul 17, 2014, 5:05:29 AM7/17/14
to adwor...@googlegroups.com
Hi Ray

When I execute the url provided by the script I get the following error on screen:

401 Error: disabled_client

The OAuth client was disabled.

Request Details
response_type=code
access_type=offline
redirect_uri=urn:ietf:wg:oauth:2.0:oob
client_id=[there is a new id generated here]

If I paste my client id into the string and try again it gets me past the consent screen and generates the code, but then I get the following error on the command line:

Your OAuth2 Credentials are incorrect.
Please see the GetRefreshToken.php example.
{
  "error" : "disabled_client",
  "error_description" : "The OAuth client was disabled."
}

I've checked and double checked the code string and my OAuth2 details in auth.ini so not sure whats wrong.

Thanks

Ray Tsang (AdWords API Team)

unread,
Jul 17, 2014, 4:26:43 PM7/17/14
to adwor...@googlegroups.com
Sarah,

Were you using an existing project or a brand new one?  If you haven't tried yet, please create a brand new project.

Thanks!

Ray

Ray Tsang (AdWords API Team)

unread,
Jul 17, 2014, 4:27:20 PM7/17/14
to adwor...@googlegroups.com
Sarah,

Lastly, please send me screenshot of the cloud console for that project in private.

Thanks!
Message has been deleted

Sarah Gilmore

unread,
Jul 21, 2014, 5:20:44 AM7/21/14
to adwor...@googlegroups.com
Hi Ray

I have now managed to work out what the issue was. At some point I started editing the Auth file in examples rather than in lib, whoops. How embarrassing!

Thanks for your help, but I've now retrieved the refresh token and will hopefully get the rest working!

Tan Pinyuan

unread,
Jun 19, 2017, 12:08:15 AM6/19/17
to AdWords API Forum


Hi, can you help me? I am logging to a website to watch video. Last time when I log in nothing when wrong but now it say

401. That’s an error.

Error: disabled_client

The OAuth client was disabled.

Request Details

That’s all we know.

What should i do to solve it?

Tan Pinyuan

unread,
Jun 19, 2017, 3:31:26 AM6/19/17
to AdWords API Forum
So is there a way to solve it?


--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/KmVNNh3bddg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e6abc5e1-73eb-4382-a957-6172a6b14ff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
TAN PIN YUAN 1I

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jun 26, 2017, 1:18:39 PM6/26/17
to AdWords API Forum
Hi Tan, 

Could you please create a new forum thread since this thread is very old? On your new thread, you could also include the relevant logs and complete error message. 

Thanks,
Sreelakshmi, AdWords API Team

CarFix Garage

unread,
Dec 27, 2018, 5:25:46 PM12/27/18
to AdWords API and Google Ads API Forum
Hi, I have same issue with my facebook calendar, when I press   "add to calendar"   error (disable client) comes up.
Thank you. 

Dhanya Sundararaju (AdWords API Team)

unread,
Dec 27, 2018, 5:55:01 PM12/27/18
to AdWords API and Google Ads API Forum
Hi,

If you have AdWords API specific issue, please create a new forum post with relevant SOAP logs and error messages so that I can check further.

Regards,
Dhanya, AdWords API Team
Reply all
Reply to author
Forward
0 new messages