sorry, forgot to copy 2 lines of code in between:

                        ad_group_criterion_operation = 
googleads_client.get_type(
                            f'AdGroupCriterionOperation'
                        )
                        ad_group_criterion = 
ad_group_criterion_operation.update
                        ad_group_criterion.resource_name = (
                            f"customers/{customer_id}/adGroupCriteria/"
                            f"{ad_group_id}~{criterion_id}"
                        )
                        googleads_client.copy_from(
                            ad_group_criterion_operation.update_mask, 
field_mask
                        )
                        
ad_group_criterion_operation.update_mask.paths.append(
                            'cpc_bid_micros'
                        )

Regards
Mat

Mat schrieb am Montag, 6. Dezember 2021 um 12:30:15 UTC+1:

> Hi Pierre,
>
> this should work:
>
>                         ad_group_criterion_operation = 
> googleads_client.get_type(
>                             'AdGroupCriterionOperation'
>                         )
>                         googleads_client.copy_from(
>                             ad_group_criterion_operation.update_mask, 
> field_mask
>                         )
>                         
> ad_group_criterion_operation.update_mask.paths.append(
>                             'cpc_bid_micros'
>                         )
>
> Regards
> Mat
> Pierre Riandey schrieb am Montag, 6. Dezember 2021 um 11:44:54 UTC+1:
>
>> Hello,
>> I am using the python client library for google ads API. In the 
>> documentation, to remove a bid it's specified to update the field to null (
>>
>> https://developers.google.cn/google-ads/api/docs/campaigns/bidding/set-bids#removing_bids
>> )
>>
>> But the client doesn't let met set the value for 
>> AdGroupCriterionOperation.update.cpc_bid_micros to something else than 
>> an integer.
>> And thus the bid is not removed.
>>
>> If anyone has some hints on how to proceed, I'm currently searching 
>> through examples in the client library, but nothing I tried is working.
>>
>> Thank a lot !
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/18d19e17-32f3-46ee-8771-93a521e2fb57n%40googlegroups.com.
  • Re... Pierre Riandey
    • ... Mat
      • ... Mat
        • ... Pierre Riandey
          • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to