Hi, My first guess is that the account you are making the API call against (<ns1:clientCustomerId>xxx-xxx-xxx</ns1:clientCustomerId>) is not linked to the account you used as the OAuth2 authentication.
Please make sure the account (<ns1:clientCustomerId>xxx-xxx-xxx</ns1:clientCustomerId>) is linked to the MCC account you used as the authentication. Best, - Takeshi, AdWords API Team On Wednesday, December 4, 2013 6:39:11 AM UTC+9, Nelutzu wrote: > > Hello all, > > I get this error when i try to get all campaigns from my mcc account using > adwords api(v201309): > > *Fatal error: Uncaught SoapFault exception: [soap:Server] > [AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'I use the client > library get it from here: > https://code.google.com/p/google-api-adwords-php/(ADWORDS_VERSION > <https://code.google.com/p/google-api-adwords-php/(ADWORDS_VERSION> > v201309).* I use OAUTH2. > > In the auth.ini i have: > *clientCustomerId : 'xxx-xxx'* - took from the mcc account(top right) > *client_id: 'xxx-xx-xx'* - took from the application( > https://code.google.com/apis/console) > *client_secret:'xxx-xx-xx'* - took from the application( > https://code.google.com/apis/console) > *refresh_token: 'xxx-xx-x'* - get it using GetRefreshToken.php from the > client library. The request is: > > https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxxxxxxx.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Fdomain.com%2Fadwords%2Ftest.php&scope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2F&access_type=offline > > The soap_xml.log file looks like: > [Dec 03 2013 16:18:39.000000 - ERROR] POST > /api/adwords/cm/v201309/CampaignService?access_token=ya29.1.AADtN_WUH1UVGTrvURQjhSqOecczcIyMAcshHrkKYwH-cW-r7BqbARbZMbv_ylVloeg1ua4 > > HTTP/1.1 > Host: adwords.google.com > Connection: Keep-Alive > User-Agent: PHP-SOAP/5.4.15, gzip > Accept-Encoding: gzip, deflate > Content-Encoding: gzip > Content-Type: text/xml; charset=utf-8 > SOAPAction: "" > Content-Length: 370 > > <?xml version="1.0" encoding="UTF-8"?> > <SOAP-ENV:Envelope xmlns:SOAP-ENV=" > http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1=" > https://adwords.google.com/api/adwords/cm/v201309"> > <SOAP-ENV:Header> > <ns1:RequestHeader> > <ns1:clientCustomerId>xxx-xxx-xxx</ns1:clientCustomerId> > <ns1:developerToken>xxxxxxxxxxxxxxxx</ns1:developerToken> > <ns1:userAgent>xxxxxx (AwApi-PHP/4.6.1, Common-PHP/5.0.0, > PHP/5.4.15)</ns1:userAgent> > </ns1:RequestHeader> > </SOAP-ENV:Header> > <SOAP-ENV:Body> > <ns1:get> > <ns1:serviceSelector> > <ns1:fields>Id</ns1:fields> > <ns1:fields>Name</ns1:fields> > </ns1:serviceSelector> > </ns1:get> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > HTTP/1.1 500 Internal Server Error > Content-Type: text/xml; charset=UTF-8 > Content-Encoding: gzip > Date: Tue, 03 Dec 2013 21:18:34 GMT > Expires: Tue, 03 Dec 2013 21:18:34 GMT > Cache-Control: private, max-age=0 > X-Content-Type-Options: nosniff > X-Frame-Options: SAMEORIGIN > X-XSS-Protection: 1; mode=block > Content-Length: 509 > Server: GSE > > <?xml version="1.0"?> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Header> > <ResponseHeader xmlns=" > https://adwords.google.com/api/adwords/cm/v201309"> > <requestId>0004eca7d6d4b7680ae5cb080000302a</requestId> > <serviceName>CampaignService</serviceName> > <methodName>get</methodName> > <operations>0</operations> > <responseTime>130</responseTime> > </ResponseHeader> > </soap:Header> > <soap:Body> > <soap:Fault> > <faultcode>soap:Server</faultcode> > <faultstring>[AuthorizationError.USER_PERMISSION_DENIED @ ; > trigger:'<null>']</faultstring> > <detail> > <ApiExceptionFault xmlns=" > https://adwords.google.com/api/adwords/cm/v201309"> > <message>[AuthorizationError.USER_PERMISSION_DENIED @ ; > trigger:'<null>']</message> > > <ApplicationException.Type>ApiException</ApplicationException.Type> > <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:type="AuthorizationError"> > <fieldPath/> > <trigger><null></trigger> > > <errorString>AuthorizationError.USER_PERMISSION_DENIED</errorString> > <ApiError.Type>AuthorizationError</ApiError.Type> > <reason>USER_PERMISSION_DENIED</reason> > </errors> > </ApiExceptionFault> > </detail> > </soap:Fault> > </soap:Body> > </soap:Envelope> > > The request_info.log: > [Dec 03 2013 16:18:39.000000 - ERROR] email= effectiveUser=xxx-xxx-xxxx > service=CampaignService method=get operators={} responseTime=130 > requestId=0004eca7d6d4b7680ae5cb080000302a operations=0 units= server= > adwords.google.com isFault=true > faultMessage=[AuthorizationError.USER_PERMISSION_DENIED @ ; > trigger:'<null>'] > > I don't know what i am doing wrong. > Any help is appreciated. > > Thanks, > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
