I found the solution to fix this, you can change the code following below
*current code (C#)*
campaign.TargetCpa = new TargetCpa
{
TargetCpaMicros = Convert.ToInt64(bidValue *
1_000_000)
};
*new code (C#)*
campaign.MaximizeConversions = new MaximizeConversions
{
TargetCpa = Convert.ToInt64(bidValue * 1_000_000)
};
On Monday, 11 October 2021 at 23:59:20 UTC+7 adsapi wrote:
> Hi Julien,
>
> At the bottom of the page of Bidding Strategy Types
> <https://developers.google.com/google-ads/api/docs/campaigns/bidding/strategy-types>
>
> it points out that a portfolio-only bidding scheme in the context of a
> standard strategy generates the error. The valid context of a TargetCPA
> bidding strategy type is only portfolio based and not campaign based.
>
> Regards,
>
> [image: Google Logo]
> Aryeh Baker
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2OVlFD: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/45480058-2c2a-45cd-9461-a936ec39ab3cn%40googlegroups.com.