Hi Swetha,

I've been through that again and recreated credentials. Running 
GetCampaigns.php now allows login but creates the following errors:

"# php GetCampaigns.php
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
'https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl' : 
failed to load external entity 
"https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl";
 in 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php
 
on line 68
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
WSDL: Couldn't load from 
'https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl' : 
failed to load external entity 
"https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl";
 in 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php:68
Stack trace:
#0 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php(68):
 
SoapClient->SoapClient('https://adwords...', Array)
#1 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\AdWords\v201708\cm\CampaignService.php(146):
 
Google\AdsApi\Common\AdsSoapClient->__construct('https://adwords...', Array)
#2 [internal function]: 
Google\AdsApi\AdWords\v201708\cm\CampaignService->__construct(Array)
#3 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\goog 
in 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php
 
on line 68

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: 
Couldn't load from 
'https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl' : 
failed to load external entity 
"https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl";
 in 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php:68
Stack trace:
#0 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php(68):
 
SoapClient->SoapClient('https://adwords...', Array)
#1 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\AdWords\v201708\cm\CampaignService.php(146):
 
Google\AdsApi\Common\AdsSoapClient->__construct('https://adwords...', Array)
#2 [internal function]: 
Google\AdsApi\AdWords\v201708\cm\CampaignService->__construct(Array)
#3 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\goog 
in 
C:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php
 
on line 68

ainzclan@DESKTOP-4D4ICSK 
c:\xampp\htdocs\performance-leads\adwords-examples-30.0.0\examples\AdWords\v201708\BasicOperations"

Having read some similar posts I have tried to access 
https://adwords.google.com/api/adwords/cm/v201708/CampaignService?wsdl 
using Curl and it works fine.

Does this mean there is a SOAP set up issue on my machine? Any ideas how to 
identify and progress? 

Current PHP version: 7.1.9

Thanks Neil


On Thursday, 28 September 2017 18:13:33 UTC+1, Shwetha Vastrad (AdWords API 
Team) wrote:
>
> Hi,
>
> The unauthorized_client error usually occurs when you are using incorrect 
> OAuth2 credentials. Could you check if you have provided the correct 
> clientId, clientSecret and refreshToken? Could you try generating a new 
> refresh token by following the instructions provided here 
> <https://github.com/googleads/googleads-php-lib/wiki/API-access-using-own-credentials-(installed-application-flow)>
> ? Could you also try the CURL request provided below and see if you are 
> able to generate the access tokens? That will help you confirm if your 
> OAuth2 credentials are valid or not.
>
> curl https://www.googleapis.com/oauth2/v4/token  \
>     -d refresh_token=MCC_refresh_token  \
>     -d client_id=your-client-id  \
>     -d client_secret=your-client-secret  \
>     -d grant_type=refresh_token
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8071cfa7-e594-4ff4-ade8-a0cd8291294e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Cant get API to... TheAinz
    • Re: Cant g... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
      • Re: Ca... TheAinz
        • Re... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
          • ... TheAinz
          • ... TheAinz
            • ... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
              • ... TheAinz
                • ... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to