Hi
I have used v8 and I want to try to block IP Addresses. (use Google\Ads\GoogleAds\V8\Services\CustomerClientLinkOperation;
)
Here is my code.
use Google\Protobuf\BoolValue;
use Google\Protobuf\StringValue;
use Google\Protobuf\Int64Value;
use Google\Protobuf\EnumValue;
use Google\Protobuf\DoubleValue;
use Google\ApiCore\ApiException;
$campaignCriterion = new CampaignCriterion([
'negative' => new BoolValue(['value' => true]),
'campaign' => new StringValue(['value' => $campaignResourceName]),
'type' => CriterionType::IP_BLOCK,
'ip_block' => new IpBlockInfo(['ip_address' => new StringValue(['value' => $ipAddress2])])
]);
I'm getting this error
code: 0
file: "/home/theclicksaver/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"
Thanks & regards
Harikesh Kumar