google-ads-php
google-ads-php copied to clipboard
Add ability to pass configuration down from the Ads client layer to the GAPIC (generated) clients
See https://github.com/googleapis/gax-php/issues/458
Users are hoping to configure GAPIC clients from the Ads client surface, but it's currently not possible. Users need to create the GAPIC clients directly in order to take advantage of GAPIC configuration. This could be done by providing an $options
array to the build
method (or somewhere else) which could be merged in with the default ads client configuration:
$options = ['transportConfig' => ['rest' => ['httpHandler' => $customHttpHandler]]];
// Currently the Ads clients do not accept configuration
$oAuth2Credential = (new OAuth2TokenBuilder())
->withClientOptions($options)
->build();
Thanks for reporting. I'll include this in prioritization.