Laravel Application not working due to the update of V8 in Google Ads Api

748 views
Skip to first unread message

Suba KV

unread,
Sep 19, 2021, 11:57:07 PM9/19/21
to AdWords API and Google Ads API Forum

Your client library and Google Ads API versions:

  • Client library version: v11.0.0

  • Google Ads API version: V7

Your environment:

php Version - v7.3.28
Windows - 10
protobuf - v3.18.0
grpc - v1.39.0
Type of Transport - rest

Description of the bug:

I had to upgrade to google-ads-php (https://github.com/googleads/google-ads-php) Version 11 as the google ads api V6 was deprecated and throwing error.

google-ads-php supports google ads api V8. While we tried executing the script I get the following error.

ERROR: Could not construct ApplicationDefaultCredentials {"userId":1,"exception":"[object] (Google\\ApiCore\\ValidationException(code: 0): Could not construct ApplicationDefaultCredentials at D:\\xampp\\htdocs\ eseller-home\\vendor\\google\\gax\\src\\CredentialsWrapper.php:267)

Previous Error with V6 (It was working perfectly until last week)

ERROR: { "message": "Request contains an invalid argument.", "code": 3, "status": "INVALID_ARGUMENT", "details": [ { "@type": 0, "data": "type.googleapis.com\/google.ads.googleads.v6.errors.GoogleAdsFailure" }, { "@type": 0, "data": [ { "errorCode": { "requestError": "UNKNOWN" }, "message": " Version v6 is deprecated. Requests to this version will be blocked." } ] } ] }


Please help us to fix this issue. Thanks

Google Ads API Forum Advisor

unread,
Sep 20, 2021, 2:34:46 AM9/20/21
to kvsub...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for posting your concern.

Could you confirm if you tried using the new sample code on the updated library, not the old code? I asked this because you will need to change the code as well when upgrading to the newest version of client library.

If you are indeed using the newest version of client library with new code but the error persists, please provide the screenshot of the folder's hierarchy of you API environment where we can see the PHP code that you are using? You may also provide the code the you used and encountered this error.

You can provide the requested details via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NVYLd:ref

Suba KV

unread,
Sep 20, 2021, 5:29:09 AM9/20/21
to AdWords API and Google Ads API Forum
Thanks for your reply

Yeah, I'm using the updated sample code. Eventhough it shouts error as  Could not construct ApplicationDefaultCredentials 
I had also cloned the repository from the main branch and run the laravel application From this Github, that's also not working. 

Could you please check this issue?

- Image of File Structure and Code Attached.

GoogleAdsApiController.php
Google ads -vendor file structure.png

Google Ads API Forum Advisor

unread,
Sep 20, 2021, 10:22:19 PM9/20/21
to kvsub...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for the confirmation and providing the requested details.

Upon further checking, it appears that the issue is more client library specific. With this, I would suggest to reach out to the author of the PHP client library by posting the concern about the error even though you are using the latest version of the client library and provide details on this link. The author of the PHP client library is more equipped to provide assistance to this kind of issue.
Reply all
Reply to author
Forward
0 new messages