googleads / google-ads-php

Google Ads API Client Library for PHP
https://developers.google.com/google-ads/api/docs/client-libs/php
Apache License 2.0
288 stars 260 forks source link

Argument 1 passed to Google\Ads\GoogleAds\Lib\V14\GoogleAdsClientBuilder::withDeveloperToken() must be of the type string #976

Closed Ross-C closed 9 months ago

Ross-C commented 9 months ago

I am receiving the following since yesterday morning and have made no changes to our code base.

I have isolated all parameters including the developer token to check they are not empty.

NB: I had the same result when I hard coded all params

$googleAdsClient = (new GoogleAdsClientBuilder()) ->withDeveloperToken(env('GOOGLE_DEVELOPER_TOKEN')) ->withLoginCustomerId(env('GOOGLE_CUSTOMER_ID')) ->withOAuth2Credential( new UserRefreshCredentials( [ 'https://www.googleapis.com/auth/adwords', 'https://www.googleapis.com/auth/userinfo.email', ], [ 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 'refresh_token' => $googleAdAccount->refresh_token, ] ) ) ->build();