Googla ads Api issue

435 views
Skip to first unread message

ruban selva

unread,
Feb 16, 2022, 11:01:36 AM2/16/22
to adwor...@googlegroups.com, jeyap...@zeptoh.com, vibee...@zeptoh.com
Hi team,
   I'm trying to use google-ads java library(Google Ads Api) with the CreateCampaign code. I'm repeatedly getting below error:

Exception in thread "main" com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: Credentials failed to obtain metadata
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:69)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1133)
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1277)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:808)
at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:563)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at com.google.ads.googleads.lib.logging.LoggingInterceptor$1$1.onClose(LoggingInterceptor.java:113)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:557)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:69)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:738)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:717)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: com.google.api.gax.rpc.AsyncTaskException: Asynchronous task failed
at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:57)
at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
at com.google.ads.googleads.v9.services.CampaignBudgetServiceClient.mutateCampaignBudgets(CampaignBudgetServiceClient.java:329)
at com.google.ads.googleads.v9.services.CampaignBudgetServiceClient.mutateCampaignBudgets(CampaignBudgetServiceClient.java:294)
at clevermoe_service.GoogleAdsTest.main(GoogleAdsTest.java:51)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Credentials failed to obtain metadata
at io.grpc.Status.asRuntimeException(Status.java:535)
... 14 more
Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
{
  "error": "invalid_grant",
  "error_description": "Account has been deleted"
}
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1094)
at com.google.auth.oauth2.UserCredentials.doRefreshAccessToken(UserCredentials.java:273)
at com.google.auth.oauth2.UserCredentials.refreshAccessToken(UserCredentials.java:190)
at com.google.auth.oauth2.OAuth2Credentials$1.call(OAuth2Credentials.java:257)
at com.google.auth.oauth2.OAuth2Credentials$1.call(OAuth2Credentials.java:254)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)


The same credentials are working in adwords api.
CustomerId:9094722815

Thanks&Regards
Rubanselva v






     

Google Ads API Forum Advisor

unread,
Feb 17, 2022, 9:38:15 AM2/17/22
to rubans...@gmail.com, jeyap...@zeptoh.com, vibee...@zeptoh.com, adwor...@googlegroups.com
Hi Ruban,

Thank you for reaching out to the Google Ads API support team.

Upon taking look at your account 9094722815, please note that you cannot make API calls against a cancelled account. If you would like to get information on the cancelled account, you will have to reactivate your account. Please activate the cancelled account and try making the API request again. Let  me know if you have any question.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WwIM9:ref
Reply all
Reply to author
Forward
0 new messages