curl --location 
'https://googleads.googleapis.com/v17/customers/4926841893/campaigns:mutate' 
\
--header 'developer-token: DEVELOPER_TOKEN' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN' \
--data '{
    "operations": [
        {
            "create": {
                "name": "A smart campaign",
                "status": "PAUSED",
                "campaignBudget": 
"customers/4926841893/campaignBudgets/13772297422",
                "advertisingChannelType": "SMART",
                "advertisingChannelSubType": "SMART_CAMPAIGN",
                "targetCpa": {
                    "targetCpaMicros": 5000000
                }
            }
        }
    ]
}
'

Here is the curl with the requested information.


and here is the response from the api
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "contextError": 
"OPERATION_NOT_PERMITTED_FOR_CONTEXT"
                        },
                        "message": "The operation is not allowed for the 
given context.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "target_cpa"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "mutateError": "RESOURCE_NOT_IN_GOOGLE_ADS"
                        },
                        "message": "The resource isn't in Google Ads. It 
belongs to another ads system.",
                        "trigger": {
                            "int64Value": "13772297422"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "campaign_budget"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "yw-3eGhyoyzPhUEvNzB2Hw"
            }
        ]
    }
}
On Wednesday, July 24, 2024 at 5:31:52 PM UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for reaching out to the Google Ads API support team.
>
> Based on the provided information, it is observed that you've encountered 
> the "OPERATION_NOT_PERMITTED_FOR_CONTEXT 
> <https://developers.google.com/google-ads/api/reference/rpc/v15/ContextErrorEnum.ContextError#operation_not_permitted_for_context>"
>  
> and "RESOURCE_NOT_IN_GOOGLE_ADS 
> <https://developers.google.com/google-ads/api/reference/rpc/v17/MutateErrorEnum.MutateError#resource_not_in_google_ads>"
>  
> errors while creating smart campaign. 
>
> I could see that you've redacted information like CUSTOMER_ID, 
> LOGIN_CUSTOMER_ID and BUDGET_ID. Please share these details to investigate 
> why you're encountering those errors'.
>   
> This message is in relation to case 
> "ref:!00D1U01174p.!5004Q02vE4SX:ref" (ADR-00259272)
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@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
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f5043a13-6130-442b-bd3b-6019578efff0n%40googlegroups.com.
  • Cr... Darshan Dhabale
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Darshan Dhabale
        • ... Darshan Dhabale

Reply via email to