Thanks for the insight, Eric.

I read through the SOAP error, but couldn't glean the problem (only that the 
Add operation was not permitted):

    [faultstring] => [OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ 
operations[0]]
    [faultcode] => soap:Server
    [detail] => stdClass Object
        (
            [ApiExceptionFault] => stdClass Object
                (
                    [message] => 
[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ operations[0]]
                    [ApplicationException.Type] => ApiException
                    [errors] => SoapVar Object
                        (
                            [enc_type] => 0
                            [enc_value] => OperationAccessDenied Object
                                (
                                    [reason] => ADD_OPERATION_NOT_PERMITTED
                                    [fieldPath] => operations[0]
                                    [trigger] =>
                                    [ApiErrorType] => OperationAccessDenied
                                    [_parameterMap:private] => Array
                                        (
                                            [ApiError.Type] => ApiErrorType
                                        )

                                )

                            [enc_stype] => OperationAccessDenied
                            [enc_ns] => 
https://adwords.google.com/api/adwords/cm/v200909
                        )

                )

        )


Unfortunately, I don't know why it's being denied.

I have my clientEmail active, set as:

auth.ini: clientEmail = "some...@example.com"

(yes, the email was changed to protect the innocent), and I'm using the sandbox:

settings.ini: DEFAULT_SERVER = "https://adwords-sandbox.google.com";

---------------

The error that I get in my soap_xml.log is interesting in that it is using the 
wrong developer token; I have some...@example.com in my auth.ini file:

developerToken = "some...@example.com++usd"

... but it's showing up as my email address in the developerToken:

[Feb 16 2010 12:41:04.000000 - INFO] POST 
/api/adwords/cm/v200909/CampaignService HTTP/1.1
Host: adwords-sandbox.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.6
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1361

<?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/v200909"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader xsi:type="ns1:RequestHeader">
      <ns1:applicationToken>knowledgevine</ns1:applicationToken>
      <ns1:authToken>*****</ns1:authToken>
      <ns1:developerToken>camer...@igods.com++usd</ns1:developerToken>
      <ns1:userAgent>PHP v5.2.6 - AdWords API PHP Client Library - v1.2.2 - 
KnowledgeVine</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate xsi:type="mutate">
      <ns1:operations xsi:type="ns1:CampaignOperation">
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand xsi:type="ns1:Campaign">
          <ns1:name>Interplanetary Cruise #1266352864</ns1:name>
          <ns1:status>PAUSED</ns1:status>
          <ns1:budget xsi:type="ns1:Budget">
            <ns1:period>DAILY</ns1:period>
            <ns1:amount xsi:type="ns1:Money">
              <ns1:microAmount>50000000</ns1:microAmount>
            </ns1:amount>
            <ns1:deliveryMethod>STANDARD</ns1:deliveryMethod>
          </ns1:budget>
          <ns1:biddingStrategy xsi:type="ns1:ManualCPC" />
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v200909";>
      <requestId>631872c17b7de1e452f5fc7296173bd3</requestId>
      <operations>1</operations>
      <responseTime>343</responseTime>
      <units>1</units>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ 
operations[0]]</faultstring>
      <detail>
        <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v200909";>
          <message>[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ 
operations[0]]</message>
          <ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="OperationAccessDenied">
            <fieldPath>operations[0]</fieldPath>
            <trigger />
            <ApiError.Type>OperationAccessDenied</ApiError.Type>
            <reason>ADD_OPERATION_NOT_PERMITTED</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

---------------

I checked the request_info.log as well and saw pretty much the same thing in a 
shorter form:

[Feb 16 2010 12:41:04.000000 - INFO] email=some...@example.com 
effectiveuser=some...@example.com service=CampaignService method=mutate 
operators={ADD: 1} responseTime=343 requestId=631872c17b7de1e452f5fc7296173bd3 
operations=1 units=1 server=adwords-sandbox.google.com isFault=true 
faultMessage=[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ operations[0]]


---------------


I've also tried doing a Get using the live server:

settings.ini: DEFAULT_SERVER = "https://adwords.google.com";

I'm afraid I'm not adept at SOAP debugging, so I'm completely in the dark at 
this point.

Thanks again for your help, Eric.

Cameron Knowlton


At 9:58 AM -0800 10/02/16, AdWords API Advisor wrote:
>Hi Cameron,
>
>This error is usually generated when attempting to add a campaign to
>an MCC account, usually because a clientEmail header isn't specified.
>Your configuration appears to be fine (both clientId or clientEmail
>will work), have you taken a look at the SOAP XML logs?  Is the header
>being set correctly?
>
>Best,
>- Eric Koleda, AdWords API Team
>
>On Feb 16, 11:56 am, iGods <camer...@igods.com> wrote:
>> is *anyone* using the PHP v2009 API? I'm guessing that it was released
>> prematurely and doesn't work at all.
>>
>> perhaps v13 was sunsetted too early? I'm really surprised that Google
>> would come out with such a defective interface.
>>
>> Cameron Knowlton
>>
>> On Feb 12, 1:01 pm, iGods <camer...@igods.com> wrote:
>>
>>
>>
>> > sorry for such a newbie question, but I'm having the problem adding a
>> > campaign to the sandbox. I notice this error has come up for others,
>> > but I thought I had my parameters setup correctly. I'm using the PHP
>> > library for api v2009.
>>
>> > email addresses have been changed to protect the innocent. this
>> > username (email) and password are valid, for a non-MCC account.
>>
>> > // in settings.ini:
>> > DEFAULT_SERVER = "https://adwords-sandbox.google.com";
>>
>> > // in auth.ini (I tried adding clientEmail below just for fun, but
>> > that didn't help either):
> > > email = "s...@example.com"
>> > password = "secretagent"
>> > userAgent = "MyPPCapp"
>> > applicationToken = "myppcapp"
>> > developerToken = "s...@example.com++usd"
>>
>> > ; Uncomment to make requests against a client account.
>> > clientId = "client_1+...@example.com"
>> > clientEmail = "client_1+...@example.com"
>>
>> > I've tried this with clientID and clientEmail disabled, enabled, and
>> > all combinations, but no luck.  I seem to be able to query the example
>> > with GetAllCampaigns.php (I'm thinking it just times out, but it does
>> > correctly report that there are no campaigns), but when I try the
>> > example AddCampaign.php I end up with the error:
>>
>> > [message:protected] =>
>> > [OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ operations[0]]
>>
>> > I've read the previous responses to this, but couldn't divine the
>> > answer. What have I overlooked here?
>>
>> > thanks in advance,
> > > Cameron
>


-- 
Cameron Knowlton
KnowledgeVine SEO Dashboards
came...@knowledgevine.net
P: 250.382.0226
http://www.knowledgevine.net

-- 
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-...@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.

Reply via email to