Closed Jejec closed 2 years ago
Since it's not clear yet if the issue is about the API itself or this client library, could you please ask in the Google Ads API forum? If it turns out that this is more related to this client library, please feel free to reopen this issue.
Hello,
Following the change of library announced by google adwords we used googleads/google-ads-php but we encountered some problems for the recovery of urls. All fields that must contain urls are empty.
ad_group_ad.ad.display_url, ad_group_ad.ad.final_urls, ad_group_ad.ad.final_mobile_urls, ad_group_ad.ad.final_app_urls
However, when we go to the interface, we have many urls. We made requests directly via the ads API and we actually retrieve urls. We therefore assume that there would be a problem with the library. Perhaps the problem comes from the use of this one. We make a connection via the following code:
$this->OAuth2 = (new OAuth2TokenBuilder()) ->withClientId($this->getConfigApi('CONFIG_GAPI_CLIENT_ID', $subsidiaryId)) ->withClientSecret($this->getConfigApi('CONFIG_GAPI_CLIENT_SECRET', $subsidiaryId)) ->withRefreshToken($this->getConfigApi('CONFIG_GAPI_REFRESH_TOKEN', $subsidiaryId)) ->build();
Followed by :
(new GoogleAdsClientBuilder()) ->withOAuth2Credential($this->getOAuth2($subsidiaryId)) ->withDeveloperToken($this->getConfigApi('CONFIG_GAPI_DEVELOPER_TOKEN', $subsidiaryId)) ->withLoginCustomerId($this->getConfigApi('CONFIG_GAPI_MCC_GOOGLE_ID', $subsidiaryId)) ->build();
We then perform a request via the getGoogleAdsServiceClient() method then searchStream($googleId, $query). We list the elements via a foreach and the iterateAllElements() method.
However, we recover all the data except the urls which makes us think of a bug.
Regards, Jérôme Cauz