Hi Google Ads Team,
I'm also trying to migrate my feed based call extensions to asset based
extensions and am getting this error when attempting to create the
CallAsset.
Here's the java code I'm using, followed by the error code with request id
and a stack trace:
AssetOperation operation = AssetOperation.*newBuilder*()
.setCreate(Asset.*newBuilder*()
.setCallAsset(CallAsset.*newBuilder*()
.setCountryCode(countryCode).setPhoneNumber(phone)))
.build();
String resourceName;
// Gets the Asset Service client.
try (AssetServiceClient assetServiceClient =
client.createAssetServiceClient()) {
// Issues the request and returns the resource name of the new Promotion
asset.
MutateAssetsResponse response = assetServiceClient.mutateAssets(String.
*valueOf*(customerId),
ImmutableList.*of*(operation));
resourceName = response.getResults(0).getResourceName();
*log*.info("Created CallAsset with resource name " + resourceName);
} catch (ApiException e) {
throw new ExternalApiException(e);
}
CampaignAssetOperation op = CampaignAssetOperation
.*newBuilder*().setCreate(CampaignAsset.*newBuilder*
().setAsset(resourceName)
.setFieldType(*AssetFieldType*.*CALL*).setCampaign(ResourceNames.*campaign*(customerId,
campaignId)))
.build();
// Creates a service client.
try (CampaignAssetServiceClient campaignAssetServiceClient =
client.createCampaignAssetServiceClient()) {
// Issues the mutate request.
MutateCampaignAssetsResponse response = campaignAssetServiceClient
.mutateCampaignAssets(String.*valueOf*(customerId), Lists.*newArrayList*
(op));
// Prints some information about the result.
for (MutateCampaignAssetResult result : response.getResultsList()) {
*log*.info("Attached CallAsset to campaign");
}
} catch (ApiException e) {
throw new ExternalApiException(e);
}
Caused by: com.google.ads.googleads.v9.errors.GoogleAdsException: errors {
error_code {
asset_error: CUSTOMER_NOT_ON_ALLOWLIST_FOR_ASSET_TYPE
}
message: "The customer is not in the allow-list for this asset type."
trigger {
string_value: "CALL"
}
location {
field_path_elements {
field_name: "operations"
index: 0
}
}
}
request_id: "gLMRh6DpOosHAGYjnUsoKw"
at
com.google.ads.googleads.v9.errors.GoogleAdsException$Factory.createException(GoogleAdsException.java:42)
at
com.google.ads.googleads.v9.errors.GoogleAdsException$Factory.createException(GoogleAdsException.java:34)
at
com.google.ads.googleads.lib.BaseGoogleAdsException$Factory.createGoogleAdsException(BaseGoogleAdsException.java:105)
at
com.google.ads.googleads.lib.callables.GoogleAdsExceptionTransformation.transform(GoogleAdsExceptionTransformation.java:36)
at
com.google.ads.googleads.lib.callables.ExceptionTransformingUnaryCallable$ExceptionTransformingFuture.onFailure(ExceptionTransformingUnaryCallable.java:82)
at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
at
com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1074)
at
com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
at
com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1213)
at
com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:983)
at
com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:771)
at
com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:200)
at
com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
at
com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
at
com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
...................
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.AssetServiceClient.mutateAssets(AssetServiceClient.java:313)
at
com.google.ads.googleads.v9.services.AssetServiceClient.mutateAssets(AssetServiceClient.java:279)
....................
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request
contains an invalid argument.
at io.grpc.Status.asRuntimeException(Status.java:535)
... 17 more
On Thursday, December 2, 2021 at 12:39:08 AM UTC-5 adsapi wrote:
> Hello Shirly,
>
>
>
> Thank you for reaching out to us.
>
> Can you also share to us the complete API logs (request
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
> and response
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
> with request-id
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>)
>
> generated when the error was encountered? Since you're using PHP, you can
> enable logging via this guide
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>
> .
>
> You can then send those requested details via the *Reply privately to
> author* option. If this option is not available, you may send the details
> directly to our *[email protected]* alias instead.
>
> Regards,
> [image: Google Logo]
> Mark Kevin Albios
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2Ruvb2:ref
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/696f6540-cb83-43d2-b536-76583f80168bn%40googlegroups.com.