Error thrown while using Adwords API using Test MCC account and developer token generated from production MCC account

60 views
Skip to first unread message

ravindra naik

unread,
Nov 20, 2014, 1:59:34 AM11/20/14
to adwor...@googlegroups.com

Hi,

I am trying to use keyword planner api. I have generated a developer token from Production MCC account and I am using a test MCC account for testing. I have created Client Id and client secret key using test account credentials.

But I have been getting this exception:

Exception in thread "main" java.lang.NullPointerException
at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
at com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:92)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
at com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)


Can anyone suggest me as to what to do. I have been trying to fix this since last two days. Please revert back to this as soon as possible

Thanks in advance

Josh Radcliff (AdWords API Team)

unread,
Nov 20, 2014, 4:27:24 PM11/20/14
to adwor...@googlegroups.com
Hi,

You may want to check out the discussion on the related closed issue for the Java client library. That NullPointerException means that your request is failing, probably due to missing parameters in your ~/ads.properties file.

Are you using the latest version of the client library? I ask because the issue was fixed recently by the release of google-oauth-client 19.0.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages