Oauth Get Refresh Token - Error: invalid_client No Support Email

10,632 views
Skip to first unread message

Dev Steelorbis

unread,
Nov 15, 2013, 3:41:54 AM11/15/13
to google-doubleclick...@googlegroups.com
In GetRefreshToken.java example, when I tried to paste the generated code to browser I got this error:
 

Error: invalid_client

no support email

Request Details
 
 I also get error message when I try to set email address in "Consent screen" menu of Google Cloud Console. I wonder if these two error have any relationship.

 

Vincent Tsao (DFP API Team)

unread,
Nov 15, 2013, 5:19:01 PM11/15/13
to google-doubleclick...@googlegroups.com
Hello:

Please answer the following:

(1) On the Google Cloud Console, did you Register App with the platform as "Native"?
(2) Also, what is your email address that you're using? You can reply directly to me using the reply drop down on the right "Reply to author" so your email isn't shown on this public forums.

Thanks,
Vincent Tsao, DFP API Team

wpmed...@washpost.com

unread,
Nov 19, 2013, 2:26:01 PM11/19/13
to google-doubleclick...@googlegroups.com, wpmed...@washpost.com
Vincent

I am new to DFP arena, I need to set up the API to extract dimensions (42 tables) data related to Network impressions and clicks. I tried Python initially but it did not work as the version you support for python is older than what we have in our environment.

Any ways I decided to use Java now, I downloaded dfp-axis-examples-1.20.1.tar.gz 

with maven from 


got the package imported to Netbeans, execute the POM etc., followed the instructions  that are given in dfp-examples\dfp_axis\README

Provided the clientId, clientSecret, applicationName, networkCode in the properties file. then got the token from GetRefreshToken

When I run any class, I keep getting the following error;

java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)

        at java.lang.Thread.run(Thread.java:744)

Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request

{

  "error" : "invalid_client"

}

        at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)

        at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)

        at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:158)

        at dfp.axis.auth.GetRefreshToken.getOAuth2Credential(dfp.axis.auth.GetRefreshToken:78)

        at dfp.axis.auth.GetRefreshToken.main(dfp.axis.auth.GetRefreshToken:114)

 

        ... 6 more

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1:52.158s

[INFO] Finished at: Mon Nov 18 15:19:30 EST 2013

[INFO] Final Memory: 7M/17M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project dfp-axis-examples:

An exception occured while executing the Java class. null: InvocationTargetException: 400 Bad Request

[ERROR] {

[ERROR] "error" : "invalid_client"

[ERROR] }

[ERROR] -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project dfp-axis-

examples: An exception occured while executing the Java class. null

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured

while executing the Java class. null

        at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352)

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

        ... 19 more

Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)

        at java.lang.Thread.run(Thread.java:744)

Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request

{

  "error" : "invalid_client"

}

        at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)

        at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)

        at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:158)

        at dfp.axis.auth.GetRefreshToken.getOAuth2Credential(dfp.axis.auth.GetRefreshToken:78)

        at dfp.axis.auth.GetRefreshToken.main(dfp.axis.auth.GetRefreshToken:114)

 

        ... 6 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


I am not able to proceed any further on my task, any insights will be helpful.

thanks

Opesh Gupta
for The Washington post.

20.1� . z P � �&+ a> 

Vincent Tsao (DFP API Team)

unread,
Nov 19, 2013, 6:00:38 PM11/19/13
to google-doubleclick...@googlegroups.com, wpmed...@washpost.com
Hi Opesh:

You followed the instructions here right?

Can you confirm that you:
(1) Created a new API project in the Google Cloud Console logged in as the email address that is also a user on your DFP network.
(2) Registered an application of type "Native" or "Installed application" if you're using the old API console interface.

Thanks,
Vincent Tsao, DFP API Team


Janos Gyerik

unread,
Nov 23, 2013, 5:14:59 PM11/23/13
to google-doubleclick...@googlegroups.com, wpmed...@washpost.com
I have the same problem.

Yes, I followed that guide to the letter, and registered an app of type native.

I'm wondering if the error is about setting an email address on the Consent screen. I would like to, but I cannot. When I try, I select my email address from the pulldown menu (only one choice), and when I click on Save, I get this message:

Whoops! Our bad.
Please try again. If the problem persists, please let us know using the "Send feedback" link below. Copy the tracking number below, and include it with your feedback. Thanks!
Tracking Number: 1659578093414499894

Not sure if this Consent screen issue is related, but I have no idea what else I can try.

Janos

Vincent Tsao (DFP API Team)

unread,
Nov 25, 2013, 2:16:04 PM11/25/13
to google-doubleclick...@googlegroups.com, wpmed...@washpost.com
Hi Janos:

To clarify, are you also receiving the "invalid_client No Support Email" message? It sounds like you're getting a different error message. If you're planning to use an offline refresh token to access DFP from a server on behalf of your API user, there's really no reason to play around with the consent screen as you'll only need to internally allow access to your own application once (Google offline OAuth 2 refresh tokens do not expire).

Can you clarify what error you're receiving? Also, can you try creating a new project in the Google Cloud Console and then register a new native application in that new project to get a new client ID and secret?

Thanks,
Vincent Tsao, DFP API Team

Dev Steelorbis

unread,
Nov 26, 2013, 7:59:20 AM11/26/13
to google-doubleclick...@googlegroups.com
I've resolved the problem. I think the new google cloud console has a bug. I tried to set the email with the old console, and it worked fine. I now use the dfp api without any problem.

Vincent Tsao (DFP API Team)

unread,
Nov 26, 2013, 1:22:33 PM11/26/13
to google-doubleclick...@googlegroups.com
Good to know you solved the issue.

If you can reproduce the bug, it would be good to post a question on our official Stack Overflow tag here:

To let the Cloud Console team know.

Thanks,
Vincent Tsao, DFP API Team

Jaweed Ahmed

unread,
Feb 22, 2014, 8:42:51 AM2/22/14
to google-doubleclick...@googlegroups.com
i am javed
please help

i am facing error when i run project show error



Error: invalid_client

Bad request.

Request Details

please please please please help my ID javedah...@gmail.com



Vincent Tsao (DFP API Team)

unread,
Feb 25, 2014, 1:54:31 PM2/25/14
to google-doubleclick...@googlegroups.com
Hi Javed:

All of our client libraries have wiki articles on how to get started with OAuth 2.0. For example, PHP's is here:

Please follow those steps closely.

Thanks,
Vincent Tsao, DFP API Team

Tapan Nathvani

unread,
Sep 15, 2014, 1:33:48 AM9/15/14
to google-doubleclick...@googlegroups.com
Hello everyone,


i am not able to create oAuth client key for my ios app, i am getting error like,

Screen Shot 2014-09-15 at 11.02.51 AM.png

Vincent Tsao (DFP API Team)

unread,
Sep 15, 2014, 6:46:25 PM9/15/14
to google-doubleclick...@googlegroups.com
Hi Tapan:

This is not the correct forums for this question. This forum only deals with the DFP API. Not sure what product you're using, but if you're using the Developer Console, you can find help information for it at this link:

Thanks,
Vincent Tsao, DFP API Team
Message has been deleted

Atul Samage

unread,
Jul 5, 2015, 2:22:02 AM7/5/15
to google-doubleclick...@googlegroups.com
hi

Vincent Tsao (DFP API Team)
i am using the google app in my raiils application
 and i am having the error as follows:

401. That’s an error.

Error: invalid_client

The OAuth client was not found.


i am using the social auth gem for my application


please help


Thank you


Atul


Vincent Tsao (DFP API Team)

unread,
Jul 6, 2015, 12:42:16 PM7/6/15
to google-doubleclick...@googlegroups.com, samag...@gmail.com
Hi Atul:

(1) Please ensure you follow the steps very closely here: https://github.com/googleads/google-api-ads-ruby/wiki/OAuth2
(2) In the future, please start a new email thread or forum post for your issues. This thread is 2 years old and probably unrelated to your issue.

Thanks,
Vincent Tsao, DFP API Team


Reply all
Reply to author
Forward
Message has been deleted
0 new messages