Doese the Google Ads API V3 wants INI file to be writable or other permissions?

18 views
Skip to first unread message

本舘勤

unread,
Apr 6, 2020, 1:12:44 AM4/6/20
to AdWords API and Google Ads API Forum
We updated the Google Ads API Version from V2 to V3 via the composer.
(We use this API in the PHP system.)

Before updated, our system went well.
However after updated, our system using this API says "segmentation fault".

The below is the code when occurs the error.

```
// We set the API setting via the INI file.
$objOAuth2Credential = (new OAuth2TokenBuilder())->fromFile(PATH_ADWORDS_INI)
                                                     ->build();
$googleAdsClient = (new GoogleAdsClientBuilder)->fromFile(PATH_ADWORDS_INI)
                                               ->withOAuth2Credential($objOAuth2Credential)
                                               ->build();
$serviceClient = $googleAdsClient->getGoogleAdsServiceClient();
```

And, the next below is the walk-through we found.

```
// We set the API setting by each setter, not using the INI file.
$objOAuth2Credential = (new OAuth2TokenBuilder())->withClientId(ApiSettingInfo::CLIENT_ID)
                                                     ->withClientSecret(ApiSettingInfo::CLIENT_SECRET)
                                                     ->withRefreshToken(ApiSettingInfo::REFRESH_TOKEN)
                                                     ->build();
$googleAdsClient = (new GoogleAdsClientBuilder)->withOAuth2Credential($objOAuth2Credential)
                                               ->withDeveloperToken(ApiSettingInfo::DEVELOPER_TOKEN)
                                               ->withLoginCustomerId(ApiSettingInfo::LOGIN_CUSTOMER_ID)
                                               ->build();
$serviceClient = $googleAdsClient->getGoogleAdsServiceClient();
```

So, I have some questions.

1) The V3 class wants the INI file to a perfect writable or other permission?
2) We cannot find any inforamtion about this issue in the API reference web-site. Is it a bug of the V3?
    If so, this issue will be solved in the next release?

Best Regards.

Google Ads API Forum Advisor Prod

unread,
Apr 6, 2020, 3:58:55 PM4/6/20
to moto...@simnet.co.jp, adwor...@googlegroups.com
Hi,

Can you provide more details or share a screenshot of the issues you are facing via reply privately to author so I can take a closer look?

Thanks,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UZWO2X:ref
Reply all
Reply to author
Forward
0 new messages