Hi there,
We are using GAds API v8 in our application and we are facing problem while 
blocking IP address from the linked account. The accounts are linked 
successfully however if we are trying to block the IP address for any 
campaign using API, it throws error. Here is piece of code that we are 
using:

use Google\Protobuf\BoolValue;
use Google\Protobuf\StringValue;
use Google\Protobuf\Int64Value;
use Google\Protobuf\EnumValue;
use Google\Protobuf\DoubleValue;
use Google\ApiCore\ApiException;

$campaignResourceName = ResourceNames::forCampaign($adwords_user_id, 
$adwords_campaign_id);

$campaignCriterion = new CampaignCriterion([
'campaign' => new StringValue(['value' => $campaignResourceName]),
'type' => CriterionType::IP_BLOCK,
'ip_block' => new IpBlockInfo(['ip_address' => new StringValue(['value' => 
$ipAddress2])])
]);

We are seeing the following error:
code: 0
file: 
"public_html/adwords/google-ads-php/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php"
line: 96
message: "Expect string."
name: "Exception"
stack-trace: [,…]
type: "InvalidArgumentException"

################

Can you please look into this and suggest me to fix the issue? My 
Manager_Customer_Id is 9663159860.


Let me know if there is anything from my end.

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/a89d8904-bd6e-466d-a730-228ca1b2097fn%40googlegroups.com.
  • Ha... Mitiz Technologies
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Mitiz Technologies
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to