Hi there, I've been following along with the Adwords API Dev series on youtube to help me setup my API, however, when running the getCampaigns.php file through terminal, I run into the following error:
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": "unauthorized_client",
"error_description": "Unauthorized"
}
' in /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::Guzzle in /Users/SeanZusi/googleads-php-lib/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
Not sure what the issue is, please let me know what the best way to go about fixing this is.
"error": "invalid_client",
"error_description": "The OAuth client was not found."
Which is odd because I was able to use GenerateRefreshToken.php using the same credentials. What is the next step?Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/