Не работает API

14 views
Skip to first unread message

off...@two-step.ru

unread,
Feb 21, 2018, 5:49:56 AM2/21/18
to AdWords API Forum
такая ошибка выходит: хотя adsapi_php.ini подставил данные и расскомментировал clientId clientSecret  refreshToken

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'All of 'clientId', 'clientSecret', and 'refreshToken' must be set when using installed/web application flow.' in C:\OSPanel\domains\two-step-ru\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php:225 Stack trace: #0 C:\OSPanel\domains\two-step-ru\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php(173): Google\AdsApi\Common\OAuth2TokenBuilder->validate() #1 C:\OSPanel\domains\two-step-ru\googleads-php-lib\examples\AdWords\v201710\BasicOperations\GetCampaigns.php(81): Google\AdsApi\Common\OAuth2TokenBuilder->build() #2 C:\OSPanel\domains\two-step-ru\googleads-php-lib\examples\AdWords\v201710\BasicOperations\GetCampaigns.php(90): Google\AdsApi\Examples\AdWords\v201710\BasicOperations\GetCampaigns::main() #3 {main} thrown in C:\OSPanel\domains\two-step-ru\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php on line 225

Milind Sankeshware (AdWords API Team)

unread,
Feb 21, 2018, 1:35:54 PM2/21/18
to AdWords API Forum
Hi,

You need to provide your OAuth2 credentials (clientId, clientSecret and refreshToken) in the adsapi_php.ini file and then run the examples. Please refer this guide for more Information. Let me know if you have further questions. 

Thanks,
Milind, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages