Google Ads API reporting run result error

11 views
Skip to first unread message

华俊

unread,
Dec 6, 2019, 9:12:17 PM12/6/19
to AdWords API and Google Ads API Forum
We could get the right data results by Google Ads API, visiting GetCampaigns.php. Now we would like to get the right data results by Web as follows: https://github.com/googleads/google-ads-php/blob/master/examples/BasicOperations/GetCampaigns.php
Run result error:

1.png

[0] InvalidArgumentException in /google-ads-php/vendor/ulrichsg/getopt-php/src/Option.php line 242

Option mode must be one of GetOpt::NO_ARGUMENT, GetOpt::OPTIONAL_ARGUMENT, GetOpt::REQUIRED_ARGUMENT and GetOpt::MULTIPLE_ARGUMENT


Invoking code as follows (The test error shows in the red box  ):

2.png


$options = (new ArgumentParser())->parseCommandArguments([
   ArgumentNames::CUSTOMER_ID => self::CUSTOMER_ID
        ]);

This code has an internal assignment error. We did a lot of research and found no one had ever had s similar problem like us.

We will be appreciated if we could get your kindly help.

Thanks in advance.

Best regards,
Leo
Reply all
Reply to author
Forward
0 new messages