Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE #473

Open
mymapdotworld opened this issue Sep 19, 2023 · 0 comments
Open

OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE #473

mymapdotworld opened this issue Sep 19, 2023 · 0 comments

Comments

@mymapdotworld
Copy link

I'm trying to add, remove blocked ip criterions,

i tested my request with deliberately false criterion_id's (when removing)
or invalid ip addresses, when adding

google's api correctly tells me that the criterion doesn't exist, or the ip is invalid

so, that brings me to the conclusion that i'm doing things right, and when i do, i get the "OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE" error

is this a misnomer, and it means i just don't have enough access rights ?

this is my code:
`const {ResourceNames} = require("google-ads-api")

const criterion = ResourceNames.campaignCriterion(customer_id, this.campaign_id, criterion_id)
await customer.campaignCriteria.remove([criterion])`

and async blockIP(address) { const customer = this.customer return await customer.campaignCriteria.create( [ { campaign: ResourceNames.campaign(customer.credentials.customer_id, this.id), type: enums.CriterionType.IP_BLOCK, ip_block: { ip_address: address }, negative: true, }, ], { response_content_type: "MUTABLE_RESOURCE", } ) }

(where "this" is an object that represents a campaign in my module,with the id, and the name of the campaign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant