[04-Sep-2017 12:05:50 UTC] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Config file not found as specified: 'adsapi_php.ini'. Home directory could not be located so it was not searched.' in /home/techximu/public_html/adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php:71
Stack trace:
#0 /home/techximu/public_html/adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/OAuth2TokenBuilder.php(61): Google\AdsApi\Common\ConfigurationLoader->fromFile('adsapi_php.ini')
#1 /home/techximu/public_html/adwords/examples/AdWords/v201609/Reporting/GetReportFields.php(63): Google\AdsApi\Common\OAuth2TokenBuilder->fromFile()
#2 /home/techximu/public_html/adwords/examples/AdWords/v201609/Reporting/GetReportFields.php(76): Google\AdsApi\Examples\AdWords\v201609\Reporting\GetReportFields::main()
#3 {main}
thrown in /home/techximu/public_html/adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php on line 71
$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile('location/to/your/adsapi_php.ini')
->build();
// Construct an API session configured from a properties file and the OAuth2
// credentials above.
$session = (new AdWordsSessionBuilder())
->fromFile('location/to/your/adsapi_php.ini')
->withOAuth2Credential($oAuth2Credential)
->build();[06-Sep-2017 08:11:54 UTC] PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://www.googleapis.com/oauth2/v4/token` resulted in a `401 Unauthorized` response:
{
"error": "invalid_client",
"error_description": "Unauthorized"
}
' in /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::Guzzle in /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
[06-Sep-2017 08:29:15 UTC] PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://www.googleapis.com/oauth2/v4/token` resulted in a `401 Unauthorized` response:
{
"error": "invalid_client",
"error_description": "Unauthorized"
}
' in /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /home/techximu/public_html/adwords/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::Guzzle in /home/techximu/public_html/adwords/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113