Not able to mutate Campaign Budget and AdGroup Bid

180 views
Skip to first unread message

Ray

unread,
Dec 16, 2021, 12:59:54 PM12/16/21
to AdWords API and Google Ads API Forum
Hi,

I am trying to make a request to the Google Ads API.
I am using the REST APIs and not the SDKs.

The requests that I am facing issues with are -
  • Updating Campaign Budget:
I seem to be getting the following error
{
    "error": {
        "code": 403,
        "message": "The caller does not have permission",
        "status": "PERMISSION_DENIED",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "authorizationError": "USER_PERMISSION_DENIED"
                        },
                        "message": "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
                    }
                ],
                "requestId": "*******************"
            }
        ]
    }
}

When I'm making several other post requests, I am able to make those calls without any errors but only this particular call is giving 'Permission Denied' issue.

I have referred the following link to structure the body of the request and get the url https://developers.google.com/google-ads/api/rest/reference/rest/v9/customers.campaignBudgets

  • Updating AdGroup Bid:
I am getting the existing adGroupBidModifiers using the query
SELECT campaign.idad_group.id, ad_group_bid_modifier.bid_modifier, ad_group_bid_modifier.criterion_id FROM ad_group_bid_modifier;

Now, using the 'criterionId' returned, I am making the call to mutate the adgroupbidmodifier but getting the following error
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "mutateError": "RESOURCE_NOT_FOUND"
                        },
                        "message": "Resource was not found.",
                        "trigger": {
                            "int64Value": "*****"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                }
                            ]
                        }
                    }
                ],
                "requestId": "*******************"
            }
        ]
    }
}
Now I am not able to understand what I am doing wrong here.

I have referred the following link to structure the body of the request and get the url
 

Hope someone can help me out here. Please let me know if you need to have a look at the body and url of the requests.

Google Ads API Forum Advisor

unread,
Dec 17, 2021, 1:59:00 AM12/17/21
to rayvan...@c1exchange.com, adwor...@googlegroups.com
Hi Ray,

Thank you for posting your concern.

To investigate the issue, could you provide the login user account that you've used to authenticate the API requests and the complete request and response logs with request ID and request header generated on your end where we can see the 2 errors? You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TLnOF:ref
Reply all
Reply to author
Forward
0 new messages