SET_OPERATION_NOT_PERMITTED

64 views
Skip to first unread message

Sriram V

unread,
Mar 8, 2018, 5:37:46 AM3/8/18
to AdWords API Forum
Hi All,

I am trying to delete a campaign audience association. Hence when I set the status as removed and push it through CampaignCriterionServiceInterface(from adwords-axis) I get a message 
OperationAccessDenied{apiErrorType=OperationAccessDenied, errorString=OperationAccessDenied.SET_OPERATION_NOT_PERMITTED, fieldPath=operations[0].operand.campaignCriterionStatus, fieldPathElements=[FieldPathElement{field=operations, index=0}, FieldPathElement{field=operand}, FieldPathElement{field=campaignCriterionStatus}], reason=SET_OPERATION_NOT_PERMITTED, trigger=DELETED}

The interesting part is, I can create objects, edit their bid adjustment, but not able to remove the audience association object. Any help on this?

Thanks,
Sriram 

Milind Sankeshware (AdWords API Team)

unread,
Mar 8, 2018, 2:08:27 PM3/8/18
to AdWords API Forum
Hi Sriram,

Looks like you are using SET operator to remove campaign audience which causing the SET_OPERATION_NOT_PERMITTED. You could use REMOVE operator with CampaignCriterionService.mutate() service. Please retry the API operation and let me know if you are still facing an issue?

Thanks,
Milind, AdWords API Team.

Sriram V

unread,
Mar 8, 2018, 2:22:50 PM3/8/18
to AdWords API Forum
Hi Milind, 

Sure thanks for the pointers. Will give it a try now.

Thanks,
Sriram

Sriram V

unread,
Mar 8, 2018, 6:49:42 PM3/8/18
to AdWords API Forum
Hi Milind,

That worked. Now I am facing a different problem where the deleted objects return ACTIVE status instead of DELETED/REMOVED.
For example) Consider, I am creating 5 campaign level audience association and deleting 5 campaign level audience association. Now in the response (CampaignCriterionReturnValue), I am getting status=ACTIVE for all the 10 audience associations. Is it the expected behavior? 

Thanks,
Sriram

Milind Sankeshware (AdWords API Team)

unread,
Mar 9, 2018, 11:57:23 AM3/9/18
to AdWords API Forum
Hi Sriram,

Could you please share the SOAP request and response log along with client customer id so that I can troubleshoot the issue?

jtian

unread,
Mar 9, 2018, 9:15:04 PM3/9/18
to AdWords API Forum
Hi Milind,

Sorry for the late reply. I am actually using adwords-axis-3.10.0 jar for making the request. Hence I don't have the actual XML with which request is being made. The test account that I am using is 935-132-4820. I don't know about the client customerId. I will get back to you after I get that.

In the meantime, I was trying to perform group audience association delete using AdGroupCriterionServiceInterface. In the response, I am getting, AdGroupCriterionReturnValue but without userStatus and bidModifier. Can you also confirm if this is expected?

Thanks,
Sriram

Milind Sankeshware (AdWords API Team)

unread,
Mar 12, 2018, 11:49:55 AM3/12/18
to AdWords API Forum
Hi Jtian,

Please find below details,
  1. Could you please enable the log and share the SOAP request and response along with the client customer ID. To enable the log please follow the steps in this guide
  2. Yes, it is expected behavior. In AdGroupCriterionService.mutate() with REMOVE operator, you will not get values for userStatus and bidMofdifier. 
Let me know if you have further questions. 

Sriram V

unread,
Mar 13, 2018, 5:01:10 PM3/13/18
to AdWords API Forum
Hi Milind,

Thanks for your reply. I tried with the logging info that you provided and given below are my XML request and response
Request:
[13 Mar 2018 13:44:43.955] [pacman-system-akka.actor.default-dispatcher-21] DEBUG com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - SOAP request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201710" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>935-132-4820</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>marinsoftware.com:marin-google-api-coordinator:C02MF1S0FD (AwApi-Java, AdWords-Axis/3.10.0, Common-Java/3.10.0, Axis/1.4, Java/1.8.0_92, maven)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <operations>
                <operator>REMOVE</operator>
                <operand>
                    <campaignId>1120864295</campaignId>
                    <criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201710" xsi:type="ns2:CriterionUserList">
                        <ns2:id>329331701420</ns2:id>
                        <ns2:userListId>111423006</ns2:userListId>
                    </criterion>
                    <campaignCriterionStatus>REMOVED</campaignCriterionStatus>
                </operand>
            </operations>
            <operations>
                <operator>REMOVE</operator>
                <operand>
                    <campaignId>1120864292</campaignId>
                    <criterion xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201710" xsi:type="ns3:CriterionUserList">
                        <ns3:id>329331701420</ns3:id>
                        <ns3:userListId>111423006</ns3:userListId>
                    </criterion>
                    <campaignCriterionStatus>REMOVED</campaignCriterionStatus>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>
</soapenv:Envelope>


Response:

[13 Mar 2018 13:44:43.955] [pacman-system-akka.actor.default-dispatcher-21] DEBUG com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - SOAP response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201710">
            <requestId>00056751540d97310a37c941370d4f82</requestId>
            <serviceName>CampaignCriterionService</serviceName>
            <methodName>mutate</methodName>
            <operations>2</operations>
            <responseTime>157</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201710">
            <rval>
                <ListReturnValue.Type>CampaignCriterionReturnValue</ListReturnValue.Type>
                <value>
                    <campaignId>1120864295</campaignId>
                    <isNegative>false</isNegative>
                    <criterion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CriterionUserList">
                        <id>329331701420</id>
                        <type>USER_LIST</type>
                        <Criterion.Type>CriterionUserList</Criterion.Type>
                        <userListId>111423006</userListId>
                        <userListName>watch</userListName>
                    </criterion>
                    <bidModifier>1.0</bidModifier>
                    <campaignCriterionStatus>ACTIVE</campaignCriterionStatus>
                    <CampaignCriterion.Type>CampaignCriterion</CampaignCriterion.Type>
                </value>
                <value>
                    <campaignId>1120864292</campaignId>
                    <isNegative>false</isNegative>
                    <criterion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CriterionUserList">
                        <id>329331701420</id>
                        <type>USER_LIST</type>
                        <Criterion.Type>CriterionUserList</Criterion.Type>
                        <userListId>111423006</userListId>
                        <userListName>watch</userListName>
                    </criterion>
                    <bidModifier>1.0</bidModifier>
                    <campaignCriterionStatus>ACTIVE</campaignCriterionStatus>
                    <CampaignCriterion.Type>CampaignCriterion</CampaignCriterion.Type>
                </value>
            </rval>
        </mutateResponse>
    </soap:Body>
</soap:Envelope>


As you can see in this response, the campaignCriterionStatus is returned as ACTIVE in this XML response.

Thanks,
Sriram

Milind Sankeshware (AdWords API Team)

unread,
Mar 14, 2018, 2:56:25 PM3/14/18
to AdWords API Forum
Hi Sriram,

Thanks for sharing the log details. I was able to re-create the issue. Let me get in touch with the team regarding this. I will get back to you with an update when I heard back from them. In the meanwhile, you could use the CampaignCriterionService.get() with campaign id and the criterionId as a filter and confirm that the removed criterion is not being returned via the API. It should only return all the active user list associated with that campaign. Please check the sample code in java here, which might be helpful for you. Samples in other languages can also be found here. Also, in AdWords UI, you could check the active user list under the Audience tab for campaign. 

Thanks,
Milind, AdWords API.

Sriram V

unread,
Mar 14, 2018, 3:32:39 PM3/14/18
to AdWords API Forum
Thanks Milind for the pointers.

Kind Regards,
Sriram
Reply all
Reply to author
Forward
0 new messages