🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: mailing.freebsd.cvs
1 messages
1 total messages Started by Mitiz Technologies Mon, 01 Nov 2021 07:51
Having issue with IpBlockInfo in latest version of GAds API
#1
Author: Mitiz Technologies
Date: Mon, 01 Nov 2021 07:51
42 lines
2435 bytes
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!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads