Article View: mailing.freebsd.cvs
Article #1Having issue with IpBlockInfo in latest version of GAds API
From: Mitiz Technologies
Date: Mon, 01 Nov 2021 07:51
Date: Mon, 01 Nov 2021 07:51
42 lines
2435 bytes
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!
Technical Details
Message-ID:
<168a2f01-999d-4fd5-a5b5-c8568d46f1f3n@googlegroups.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <168a2f01-999d-4fd5-a5b5-c8568d46f1f3n@googlegroups.com> Subject: Having issue with IpBlockInfo in latest version of GAds API Date: Mon, 01 Nov 2021 07:51:51 +0000 From: Mitiz Technologies <mitizdev@gmail.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mail X-Received: by 2002:ac8:5e0a:: with SMTP id h10mr27602117qtx.195.1635753112296; Mon, 01 Nov 2021 00:51:52 -0700 (PDT) X-Received: by 2002:a05:6214:226e:: with SMTP id gs14mr26727374qvb.8.1635753112157; Mon, 01 Nov 2021 00:51:52 -0700 (PDT) Newsgroups: mailing.freebsd.cvs Injection-Info: google-groups.googlegroups.com; posting-host=103.160.176.39; posting-account=WnBHhgoAAACNgqQKx_GuoRFXlrnC95CJ Nntp-Posting-Host: 103.160.176.39 User-Agent: G2/1.0 Mime-Version: 1.0 Injection-Date: Mon, 01 Nov 2021 07:51:52 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lines: 42