searchStream API issue

21 views
Skip to first unread message

Adrian Neacsu

unread,
Jun 9, 2025, 9:20:05 AM (7 days ago) Jun 9
to Google Ads API and AdWords API Forum
Hi,

I implemented - a couple of years ago - V13 for adwords API - click report, but now is not working.
We moved to another server with PHP 8.3, installed API library from:
Ran composer, installed dependencies, protobuf, gRpc.

I have an ini file with:
developerToken
loginCustomerId
clientId
clientSecret
refreshToken

I am not sure if some if these expired.
A simple GetCampaigns.php gets stuck in: googleAdsServiceClient->searchStream(...)
I get 500 http error in my browser.
Inside, parameter SearchGoogleAdsStreamRequest is built properly

I am not able to setup a log (either in .ini or in code), so I have no idea where it crashes.
No try / catch can trap the error.

 php -i | grep grpc gives:
grpc support => enabled
grpc module version => 1.68.0

php -i | grep protobuf gives:
protobuf

From phpinfo() I see protobuf version 4.29.1

I also tried: ->search($customerId, $query, ['pageSize' => 1000]);
And same crash with no clues.

Any idea what I'm missing? It seems related to the setup, since no method works.

Thanks,
Adrian

Google Ads API Forum Advisor

unread,
Jun 9, 2025, 1:40:12 PM (7 days ago) Jun 9
to adria...@gmail.com, adwor...@googlegroups.com
Hi Adrian,

Thank you for reaching out to the Google Ads API support team.

I understand you are encountering an error while working with the Google Ads API. From the information provided, it appears that you are using the 'v13' of the Google Ads API. The Google Ads API 'v13' was sunset on January 31, 2024. The sunset version can no longer be used. Requests sent to this version will fail on or after the sunset date. You need to upgrade from the sunset versions immediately to use the Google Ads API. We highly recommend that you upgrade to the latest version, 'v20', as soon as possible to benefit from new features. You may refer to the documentation on deprecation and sunset for more information regarding the specific deprecation and sunset dates for each available version.

Also, refer to this table that shows which client libraries work with which API versions. The 'v20' of the Google Ads API requires at least the PHP client library version of '28.0.0'.

A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of 'Testing' is issued a refresh token expiring in 7 days. Change the publishing status to 'In production' to avoid the refresh token expiring in 7 days. For more details about the refresh token expiration, refer to the Google Identity Platform OAuth documentation. Also, an access token has an expiration time (based on the expires_in value) after which the token is no longer valid. You can use the refresh token to refresh an expired access token. By default, our client libraries automatically refresh expired access tokens. You may refer to this guide on 'Fetch a refresh token', which uses the oauth2l command instead of curl to fetch the OAuth 2.0 refresh tokens. Another option for generating OAuth2 credentials is to use the OAuth2 Playground. The OAuth2 Playground, in conjunction with the Google API Console, lets you manually create OAuth2 tokens. You may also check this sample code for generating user credentials.

Since you are using the PHP client library, you can enable logging by referring to this guide on PHP.

I hope this helps.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-09 12:39:16Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01reeC5:ref" (ADR-00312545)



Google Ads API Forum Advisor

unread,
Jun 9, 2025, 11:29:41 PM (7 days ago) Jun 9
to adria...@gmail.com, adwor...@googlegroups.com

Hi,

Please note that this concern is out of scope for our team as our team only provides support for Google Ads API related concerns and technical implementations. I would recommend you to contact the GCP Product Support team for further assistance regarding this concern as they are better equipped to address this concern.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-09 22:29:04Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01reeC5:ref" (ADR-00312545)



Reply all
Reply to author
Forward
0 new messages