Can not add a new Compaign Bid Modifier

89 views
Skip to first unread message

Jian Hu

unread,
Sep 27, 2021, 10:25:17 AM9/27/21
to AdWords API and Google Ads API Forum


Hello,

This morning I alreay asked two questions, I have a new problem for create a compaign Bid Modifier
Thanks for your reply.

I use PHP + Laravel with your lib php.

Questions:

1.I want to create a new Campaign Bid Modifier in my campaign shopping
I use your example:https://developers.google.com/google-ads/api/docs/samples/add-campaign-bid-modifier?hl=en

But system always return an error, for example:
Request with ID 'eaFdmLVeNHLKx0dVbz7VEw' has failed.
Google Ads failure details: context_error: The operation is not allowed for the given context.

Could you give me some informations why the operation is not allowed ?
thanks very much

Best Regards,

Jian Hu

unread,
Sep 28, 2021, 5:02:27 AM9/28/21
to AdWords API and Google Ads API Forum

I executed your example/php:

https://github.com/googleads/google-ads-php/blob/main/examples/CampaignManagement/AddCampaignBidModifier.php

 for create a new campaign bid modifier (with a campaign shopping) and I always have this error: The operation is not allowed for the given context.

 

All infos log:

[2021-09-28T10:57:27.622521+02:00] google-ads.WARNING: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v8.services.CampaignBidModifierService/MutateCampaignBidModifiers", CustomerId: 5537212111, RequestId: "HPqOB29p1KX4rzLLuBMaww", IsFault: 1, FaultMessage: "["The operation is not allowed for the given context."]" 

[2021-09-28T10:57:27.622739+02:00] google-ads.NOTICE: Request

-------

Method Name: /google.ads.googleads.v8.services.CampaignBidModifierService/MutateCampaignBidModifiers

Host: googleads.googleapis.com

Headers: {

    "x-goog-api-client": "gl-php\/7.4.23 gapic\/ gax\/1.9.0 grpc\/1.25.0 rest\/1.9.0",

    "x-goog-request-params": "customer_id=5537212111",

    "developer-token": "REDACTED",

    "login-customer-id": "2839567378"

}

Request:

{"customerId":"5537212111","operations":[{"create":{"campaign":"customers/5537212111/campaigns/14791700540","bidModifier":0.5,"interactionType":{"type":"CALLS"}}}],"responseContentType":"MUTABLE_RESOURCE"}

 

Response

-------

Headers: {

    "request-id": "HPqOB29p1KX4rzLLuBMaww",

    "date": "Tue, 28 Sep 2021 08:57:25 GMT",

    "content-length": "0",

    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""

}

 

Fault

-------

Status code: 3

Details: Request contains an invalid argument.

Failure: {"errors":[{"errorCode":{"contextError":"OPERATION_NOT_PERMITTED_FOR_CONTEXT"},"message":"The operation is not allowed for the given context.","trigger":{"stringValue":"SHOPPING"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"interaction_type"}]}}],"requestId":"HPqOB29p1KX4rzLLuBMaww"} 

Request with ID 'HPqOB29p1KX4rzLLuBMaww' has failed.

Google Ads failure details:

                context_error: The operation is not allowed for the given context.

 

Thanks very much !

Reply all
Reply to author
Forward
0 new messages