How to use "update" with AssetOperation?

23 views
Skip to first unread message

adword...@fortnine.ca

unread,
Sep 27, 2022, 11:39:32 AM9/27/22
to Google Ads API and AdWords API Forum
Hello,

I'm trying to programmatically updates page_feed_assets. I'm following the documentation here:  https://developers.google.com/google-ads/api/reference/rpc/v10/AssetOperation

As noted in the documentation: "Update operation: The asset is expected to have a valid resource name in this format: customers/{customer_id}/assets/{asset_id}"

I'm not sure how add the resource name. I've tried something like this:

```
operation = client.get_type("AssetOperation")
page_feed_asset = operation.update.page_feed_asset
page_feed_asset.resource_name = "customers/xxxx/assets/xxxx"
page_feed_asset.labels.append('test')
operation
```
This gives me the error "AttributeError: Unknown field for PageFeedAsset: resource_name".

Any help would be appreciated.





Google Ads API Forum Advisor

unread,
Sep 27, 2022, 2:34:37 PM9/27/22
to adword...@fortnine.ca, adwor...@googlegroups.com
Hi, 

You have reached the Google Ads API Forum. 

In order to investigate the said error, could you please provide the complete API logs request and response logs with request ID and request header that generated on your end so that we can take a closer look? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link

For privacy purposes, you can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsapi-support@google.com.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


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