Hi Team,
I need to create Structured Snippet Extensions using Google Ads API. So I
researched Google Ads API and started working on it.
As per documentation, recommends to create Asset for structured snippet
extensions. Below I mentioned the flow in which I'm trying to create a
Structured Snippet.
1. created *StructuredSnippetAsset *
2. created *Asset *with *StructuredSnippetAsset *
3. created *AssetOperation *using *Asset*
4. created *mutateAssets *using *AssetOperation*
5. Getting *Resource Name *from *mutateAssets*
6. *created AdGroupAsset *with {$adgroupId, asset, field_type}
7. created * AdGroupAssetOperation *using *AdGroupAsset *
8. And finally trying to *mutateAdGroupAssets *with AdGroupAssetOperation.
But we got an error as mentioned below.
When I try to mutate the AdGroupAsset operation it throws
*"RESOURCE_NOT_FOUND". *I attached the log file below for your reference.
1. Is the Flow we are trying to create a StructureSnippet the correct way ?
2. If Correct, What were we missing in this request ? Why did we get this
error?
Please guide us to resolve this error. We need to do this asap. We have
used PHP Google Ads API client library.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"Google Ads API and AdWords 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/b415c0ed-6273-4026-9146-54de0837a96dn%40googlegroups.com.
[2022-06-17T03:40:45.215523-07:00] google-ads.INFO: Request made: Host:
"googleads.googleapis.com", Method:
"/google.ads.googleads.v10.services.AssetService/MutateAssets", CustomerId:
7952846305, RequestId: "_hglKrolq5o81zYVOXiKog", IsFault: 0, FaultMessage:
"None"
[2022-06-17T03:40:45.215874-07:00] google-ads.DEBUG: Request
-------
Method Name: /google.ads.googleads.v10.services.AssetService/MutateAssets
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/7.2.24 gccl\/14.0.0 gapic\/14.0.0 gax\/1.12.1
grpc\/1.43.0 rest\/1.12.1",
"x-goog-request-params": "customer_id=7952846305",
"developer-token": "REDACTED",
"login-customer-id": "1385122748"
}
Request:
{"customerId":"7952846305","operations":[{"create":{"name":"Structure Snippet
Asset","structuredSnippetAsset":{"header":"Brands","values":["Linux security
1","Windows security 2","Admin security 3"]}}}]}
Response
-------
Headers: {
"content-disposition": "attachment",
"request-id": "_hglKrolq5o81zYVOXiKog",
"date": "Fri, 17 Jun 2022 10:40:45 GMT",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\";
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\";
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}
Response:
{"results":[{"resourceName":"customers/7952846305/assets/41765244626"}]}
[2022-06-17T03:40:45.829897-07:00] google-ads.WARNING: Request made: Host:
"googleads.googleapis.com", Method:
"/google.ads.googleads.v10.services.AdGroupAssetService/MutateAdGroupAssets",
CustomerId: 7952846305, RequestId: "9s0R9LKj1IF0Vw0UmOSbPw", IsFault: 1,
FaultMessage: "["Resource was not found."]"
[2022-06-17T03:40:45.830086-07:00] google-ads.NOTICE: Request
-------
Method Name:
/google.ads.googleads.v10.services.AdGroupAssetService/MutateAdGroupAssets
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/7.2.24 gccl\/14.0.0 gapic\/14.0.0 gax\/1.12.1
grpc\/1.43.0 rest\/1.12.1",
"x-goog-request-params": "customer_id=7952846305",
"developer-token": "REDACTED",
"login-customer-id": "1385122748"
}
Request:
{"customerId":"7952846305","operations":[{"create":{"adGroup":"customers/7952846305/adGroups/-1","asset":"customers/7952846305/assets/41765244626","fieldType":"STRUCTURED_SNIPPET"}}]}
Response
-------
Headers: {
"request-id": "9s0R9LKj1IF0Vw0UmOSbPw",
"date": "Fri, 17 Jun 2022 10:40:45 GMT",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\";
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\";
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}
Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure:
{"errors":[{"errorCode":{"mutateError":"RESOURCE_NOT_FOUND"},"message":"Resource
was not
found.","trigger":{"int64Value":"-1"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0}]}}],"requestId":"9s0R9LKj1IF0Vw0UmOSbPw"}