Re: Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-10 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Chad,

Thank you for the reply.

Kindly note that we asked for the complete logs (request and response with 
request-id) to be sure that the ads you are updating are indeed ImageAd or 
other types that are not supported through the Google Ads API, as the ad that 
you have provided is reducted and there are other types of ads that are 
supported in updating. However, if the ad that you are updating is indeed an 
ImageAd, then I'm afraid that updating this is indeed not supported with the 
AdService. You may check this documentation for more information.

Moving forward to this "With that though, the bug occurred client-side, on my 
workstation. It resulted in a malformed request, as each path in the field mask 
was prefixed with "update."
Is this the error you're referring to?"

Thanks for this update. However, the thing we are referring to is the 
information I mentioned in my above response.

You may see the links below for the following emphasize words from the above 
statement:

request : 
https://developers.google.com/google-ads/api/docs/concepts/field-service#request
response: 
https://developers.google.com/google-ads/api/docs/concepts/field-service#response
request-id : 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id
documentation : 
https://developers.google.com/google-ads/api/reference/rpc/v13/AdService#mutateads

Best regards,

Google Ads API Team
ref:_00D1U1174p._5004Q2kFRLt: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/qRIfg0RSWDAM002Wjgtrz8TTm8UkezTl3H6A%40sfdc.net.


Re: Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-05 Thread Chad Wood
I guess there is this bug I brought up:

By the way, the for loop with the comment saying "Fixed bug", that is 
because the update mask was made wrong... It came out like this by default 
(immediately fails):
update_mask { 
paths: "update.resource_name" 
paths: "update.final_urls"
} 
update { 
resource_name: "customers/00/ads/00094117" 
final_urls: "https://www.example.app/";
} 
So, the for loop is fixing that bug. 

With that though, the bug occurred client-side, on my workstation. It 
resulted in a malformed request, as each path in the field mask was 
prefixed with "update."
Is this the error you're referring to?


On Wednesday, April 5, 2023 at 3:25:37 PM UTC-7 Chad Wood wrote:

> Based on your explanation, it sounds like the error I've received is the 
> expected behavior.
> By my understanding, the API does not support our need and there are no 
> alternatives.
>
> "Since you are using AdService 
> , 
> kindly note that updating ads is not supported for TextAd, 
> ExpandedDynamicSearchAd, GmailAd and ImageAd" 
> and "So there is no other API that can be used to modify your Ad." 
>
> So, if I may ask, what is left to investigate? How would be logs help do 
> anything *beside *confirm that the expected behavior was my result?
> On Wednesday, April 5, 2023 at 1:42:21 PM UTC-7 Google Ads API Forum 
> Advisor wrote:
>
>> Hello,
>>
>> Thank you for getting back to us.
>>
>> Please note that the *Google Ads API* manages accounts from the customer 
>> level down to the keyword level. The API can do what the Google Ads UI 
>> does, but *programmatically*. So there is no other API that can be used 
>> to modify your Ad.
>>
>> I would really like to investigate this error further, would you please 
>> provide us with the complete *request* and *response logs* with *request 
>> ID* generated as shown in the respective links, so we can check on our 
>> end the errors being thrown?
>>
>> If you haven't enabled logging yet, it can be enabled by navigating to 
>> the Client libraries > Your client library (ex. Java) > *Logging 
>> documentation*(via this link 
>> *https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging*
>>  
>> ),
>>  
>> which you can access from this link. For REST interface requests, you can 
>> enable logging via the curl command by using the -i flag.
>>
>> You can provide it via Reply privately to the author option. If this 
>> option is not available, then send it instead on this email address 
>> googleadsa...@google.com. 
>>
>> Reference Links:
>> *Request* - 
>> *https://developers.google.com/google-ads/api/docs/concepts/field-service#request*
>>  
>> 
>> *Response Logs* - 
>> *https://developers.google.com/google-ads/api/docs/concepts/field-service#response*
>>  
>> 
>> *Request ID* - 
>> *https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id*
>>  
>> 
>>
>> Regards,
>> [image: Google Logo] Google Ads API Team 
>>
>> ref:_00D1U1174p._5004Q2kFRLt: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cea3af45-5135-4422-a302-bbd75297aa1bn%40googlegroups.com.


Re: Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-05 Thread Chad Wood
Based on your explanation, it sounds like the error I've received is the 
expected behavior.
By my understanding, the API does not support our need and there are no 
alternatives.

"Since you are using AdService 
, 
kindly note that updating ads is not supported for TextAd, 
ExpandedDynamicSearchAd, GmailAd and ImageAd" 
and "So there is no other API that can be used to modify your Ad." 

So, if I may ask, what is left to investigate? How would be logs help do 
anything *beside *confirm that the expected behavior was my result?
On Wednesday, April 5, 2023 at 1:42:21 PM UTC-7 Google Ads API Forum 
Advisor wrote:

> Hello,
>
> Thank you for getting back to us.
>
> Please note that the *Google Ads API* manages accounts from the customer 
> level down to the keyword level. The API can do what the Google Ads UI 
> does, but *programmatically*. So there is no other API that can be used 
> to modify your Ad.
>
> I would really like to investigate this error further, would you please 
> provide us with the complete *request* and *response logs* with *request 
> ID* generated as shown in the respective links, so we can check on our 
> end the errors being thrown?
>
> If you haven't enabled logging yet, it can be enabled by navigating to the 
> Client libraries > Your client library (ex. Java) > *Logging 
> documentation*(via this link 
> *https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging*
>  
> ),
>  
> which you can access from this link. For REST interface requests, you can 
> enable logging via the curl command by using the -i flag.
>
> You can provide it via Reply privately to the author option. If this 
> option is not available, then send it instead on this email address 
> googleadsa...@google.com. 
>
> Reference Links:
> *Request* - 
> *https://developers.google.com/google-ads/api/docs/concepts/field-service#request*
>  
> 
> *Response Logs* - 
> *https://developers.google.com/google-ads/api/docs/concepts/field-service#response*
>  
> 
> *Request ID* - 
> *https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id*
>  
> 
>
> Regards,
> [image: Google Logo] Google Ads API Team 
>
> ref:_00D1U1174p._5004Q2kFRLt: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a492e3f5-ea15-4297-b35e-17db78a531aen%40googlegroups.com.


Re: Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-05 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hello,

Thank you for getting back to us.

Please note that the Google Ads API manages accounts from the customer level 
down to the keyword level. The API can do what the Google Ads UI does, but 
programmatically. So there is no other API that can be used to modify your Ad.

I would really like to investigate this error further, would you please provide 
us with the complete request and response logs with request ID generated as 
shown in the respective links, so we can check on our end the errors being 
thrown?

If you haven't enabled logging yet, it can be enabled by navigating to the 
Client libraries > Your client library (ex. Java) > Logging documentation(via 
this link 
https://developers.google.com/google-ads/api/docs/best-practices/logging#client_library_logging),
 which you can access from this link. For REST interface requests, you can 
enable logging via the curl command by using the -i flag.

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

Reference Links:
Request - 
https://developers.google.com/google-ads/api/docs/concepts/field-service#request
Response Logs - 
https://developers.google.com/google-ads/api/docs/concepts/field-service#response
Request ID - 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id

Regards,

Google Ads API Team
ref:_00D1U1174p._5004Q2kFRLt: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/-67NN0RSNTI000zchOKYHVQKmG_pNWh7bGeA%40sfdc.net.


Re: Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-05 Thread Chad Wood
Thanks.  Are there any workarounds? Maybe a different API?

We've got about 400 image ads, and one of the team members hardcoded utm 
parameters into the final urls. We use a tracking template though, and 
these hardcoded parameters are damaging to data quality.

I'm hoping we can avoid needing to manually update every ad's final url 
through the web portal.

On Wednesday, April 5, 2023 at 2:47:21 AM UTC-7 Google Ads API Forum 
Advisor wrote:

> Hi Chad,
>
> Thank you for reaching out to the Google Ads API support team.
>
> Since you are using AdService 
> , 
> kindly note that updating ads is not supported for TextAd, 
> ExpandedDynamicSearchAd, GmailAd and ImageAd as you can see in the 
> description of the MutateAds 
> 
>  
> method.
>
> If you are encountering errors even for ad types where update is 
> supported, please provide the complete request 
> 
>  and response 
> 
>  logs, 
> with the request-id 
> 
>  
> so we can further investigate. 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 
> .You 
> can provide it to us using the *Reply privately to author* option.
>
> Thanks,
> [image: Google Logo] Google Ads API Team 
>
> ref:_00D1U1174p._5004Q2kFRLt: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5169f07e-6a1b-44ca-ba8c-aa125cfabdc6n%40googlegroups.com.


Attempting to Modify an Ads final_url value fails. Also, possible bug found || ad_error: CANNOT_MODIFY_AD

2023-04-04 Thread Chad Wood
Hello,

At the bottom of my email, I will share my code. 
I am reaching out because I receive an error when attempting to update 
final_url at the adgroup_ad level.

*My code sends operations to your server, like this:*
update_mask { 
paths: "resource_name" 
paths: "final_urls"
} 
update { 
resource_name: "customers/00/ads/00094117" 
final_urls: "https://www.example.app/";
}

*and receives this response:*
GoogleAdsException: (
<_InactiveRpcError of RPC that terminated with: 
status = StatusCode.INVALID_ARGUMENT 
details = "Request contains an invalid argument." 
debug_error_string = "UNKNOWN:Error received from peer 
ipv4:142.250.72.170:443 
{created_time:"2023-04-04T22:59:21.263110704+00:00", grpc_status:3, 
grpc_message:"Request contains an invalid argument."}" >, 
<_InactiveRpcError of RPC that terminated with: 
status = StatusCode.INVALID_ARGUMENT 
details = "Request contains an invalid argument." 
debug_error_string = "UNKNOWN:Error received from peer 
ipv4:142.250.72.170:443 
{created_time:"2023-04-04T22:59:21.263110704+00:00", grpc_status:3, 
grpc_message:"Request contains an invalid argument."}" >, 
errors { 
error_code { 
ad_error: CANNOT_MODIFY_AD
}
message: "Cannot modify an ad."
location { 
field_path_elements { field_name: "operations" index: 0 }
}
} 

*It seems like the server is refusing. Please see also my code below:*
customer_id = '00'
client = pipeline.gads_pipe.handle.client.client

def update_ad_links(customer_id, client, updates_df):
operations = []

for row in updates_df.to_dict('records'):
ad_op = client.get_type('AdOperation')
ad = ad_op.update

ad.resource_name = row['ad_group_ad.ad.resource_name']
ad.final_urls = row['new_links']
operations.append(ad_op)

fm = protobuf_helpers.field_mask(None, ad_op._pb)

# Fixed a glitch... Converts 'update.final_urls' to 'final_urls'
for index, path in enumerate(fm.paths):
clean_path = path.split('.')[-1]
fm.paths[index] = clean_path

client.copy_from(
ad_op.update_mask,
fm
)
ad_service = client.get_service('AdService')
response = ad_service.mutate_ads(customer_id=customer_id, 
operations=operations)

return response



Any idea what is going on?


By the way, the for loop with the comment saying "Fixed bug", that is 
because the update mask was made wrong... It came out like this by default 
(immediately fails):
update_mask { 
paths: "update.resource_name" 
paths: "update.final_urls"
} 
update { 
resource_name: "customers/00/ads/00094117" 
final_urls: "https://www.example.app/";
} 
So, the for loop is fixing that bug.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d4dabfc5-d99a-44d5-a85b-f5c989ee5297n%40googlegroups.com.