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
294 stars 262 forks source link

All requests returned '400 Bad Request' #885

Closed lait1989 closed 1 year ago

lait1989 commented 1 year ago

Hi! I want to get campaigns from google ads. I created a file google_ads_php.ini in my homepath with credentials, i saw that credentials when debug request in phpstorm.

Request php google-ads-php\examples\AccountManagement\GetAccountHierarchy.php

Return PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:POST https://oauth2.googleapis.com/tokenresulted in a400 Bad Requestresponse: { "error": "invalid_grant", "error_description": "Bad Request" }

Credentials are correct and worked with version 10 of google ads api, but not it is not supported and i try to use it with 13 version.

fiboknacky commented 1 year ago

Could you try regenerating a new refresh token? Since the issue is likely to be related to the OAuth settings, if the issue persists, could you seek help in the Google Ads API forum? Thanks.

fiboknacky commented 1 year ago

Closed due to inactivity.