Hi There, I spent 30 minutes typing this before, but it seemed to disappear once I posted it So I hope this isn't a duplicate.
I am trying to get v201708 working. After getting everything setup, When I try to run I get the failure seen below: C:\DataH\xampp\htdocs\DBGoogleAdwords\examples\AdWords\v201708\BasicOperations>php GetCampaigns.php PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'All of 'clientId', 'clientSecret', and 'refreshToken' must be set when using installed/web application flow.' in C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php:204 Stack trace: #0 C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php(158): Google\AdsApi\Common\OAuth2TokenBuilder->validate() #1 C:\DataH\xampp\htdocs\DBGoogleAdwords\examples\AdWords\v201708\BasicOperations\GetCampaigns.php(77): Google\AdsApi\Common\OAuth2TokenBuilder->build() #2 C:\DataH\xampp\htdocs\DBGoogleAdwords\examples\AdWords\v201708\BasicOperations\GetCampaigns.php(89): Google\AdsApi\Examples\AdWords\v201708\BasicOperations\GetCampaigns::main() #3 {main} thrown in C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php on line 204 Fatal error: Uncaught exception 'InvalidArgumentException' with message 'All of 'clientId', 'clientSecret', and 'refreshToken' must be set when using installed/web application flow.' in C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php:204 Stack trace: #0 C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php(158): Google\AdsApi\Common\OAuth2TokenBuilder->validate() #1 C:\DataH\xampp\htdocs\DBGoogleAdwords\examples\AdWords\v201708\BasicOperations\GetCampaigns.php(77): Google\AdsApi\Common\OAuth2TokenBuilder->build() #2 C:\DataH\xampp\htdocs\DBGoogleAdwords\examples\AdWords\v201708\BasicOperations\GetCampaigns.php(89): Google\AdsApi\Examples\AdWords\v201708\BasicOperations\GetCampaigns::main() #3 {main} thrown in C:\DataH\xampp\htdocs\DBGoogleAdwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\OAuth2TokenBuilder.php on line 204 -------- My adsapi_php.ini is installed in my home directory of C:\Users\MXXXXXXX\ I know it is in the correct place, because if I rename it. I get the following error message: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Config file not found as specified: 'adsapi_php.ini' or in the home directory: 'C:\Users\MXXXXXXX\adsapi_php.ini'.... Below are the contents of this file [ADWORDS] ; Required AdWords API properties. Details can be found at: ; https://developers.google.com/adwords/api/docs/guides/basic-concepts#soap_and_xml ;MJE 20170918 developerToken = "INSERT_DEVELOPER_TOKEN_HERE" developerToken = "LHgXXXXXXXXXXXXXXXXXXXXJA" ;MJE 20170918 clientCustomerId = "INSERT_CLIENT_CUSTOMER_ID_HERE" clientCustomerId = "XXX-XXX-XXXX" ; Optional. Set a friendly application name identifier. ; userAgent = "INSERT_USER_AGENT_HERE" userAgent = "GAXXX XXXXX Client" ; Optional additional AdWords API settings. ; endpoint = "https://adwords.google.com/" ; isPartialFailure = false ; Optional setting for utility usage tracking in the user agent in requests. ; Defaults to true. ; includeUtilitiesInUserAgent = true [ADWORDS_REPORTING] ; Optional reporting settings. ; isSkipReportHeader = false ; isSkipColumnHeader = false ; isSkipReportSummary = false ; isUseRawEnumValues = false [OAUTH2] ; Required OAuth2 credentials. Uncomment and fill in the values for the ; appropriate flow based on your use case. See the README for guidance: ; https://github.com/googleads/googleads-php-lib/blob/master/README.md#getting-started ; For installed application or web application flow. ;20170918 MJE clientId = "INSERT_OAUTH2_CLIENT_ID_HERE" client_id = "2252096612XXXXXXXXXXXXXXXXXXXXmmhet6sdrr3mv.apps.googleusercontent.com" ; 20170918 MJE clientSecret = "INSERT_OAUTH2_CLIENT_SECRET_HERE" client_secret = "BRmCO1XXXXXXXXXXXXXXXXXXXX3" ; 20170918 MJE refreshToken = "INSERT_OAUTH2_REFRESH_TOKEN_HERE" ;20170920 OLD TOKEN refresh_token = "1/LCDoeNRJw48XXXXXXXXXXXXXXXXXXXXTL0_3hO29pOUm_M" refreshToken = "1/EKTGJOYehXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkIn6a1BSMFjd6SJZlj7lx" ; For service account flow. ; jsonKeyFilePath = "INSERT_ABSOLUTE_PATH_TO_OAUTH2_JSON_KEY_FILE_HERE" ; scopes = "https://www.googleapis.com/auth/adwords" ; 20170918 MJE impersonatedEmail = "INSERT_EMAIL_OF_ACCOUNT_TO_IMPERSONATE_HERE" impersonatedEmail = "this is my real email addressXXXXXXXXXXXXX" [SOAP] ; Optional SOAP settings. See SoapSettingsBuilder.php for more information. ; compressionLevel = <COMPRESSION_LEVEL> ; wsdlCache = <WSDL_CACHE> [PROXY] ; Optional proxy settings to be used by SOAP requests. ; host = "<HOST>" ; port = <PORT> ; user = "<USER>" ; password = "<PASSWORD>" [LOGGING] ; Optional logging settings. ; soapLogFilePath = "path/to/your/soap.log" ; soapLogLevel = "INFO" ; reportDownloaderLogFilePath = "path/to/your/report-downloader.log" ; reportDownloaderLogLevel = "INFO" ; batchJobsUtilLogFilePath = "path/to/your/bjutil.log" ; batchJobsUtilLogLevel = "INFO" Note!! I did not set jsonKeyFilePath Am I supposed to change that? Thanks for pointing in the right direction. ..Mike -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/1db4eb1f-65ce-415a-9027-9943af9c1736%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.