Hello,
I have just created a test manager account for google ads and then created a client from the same account. I am trying to access the create campaign Api, but getting invalid json error in response. I am attaching the request and response.
Request :
"options": {
"method": "POST",
"uri": "
https://googleads.googleapis.com/v11/customers/campaigns:mutate",
"qs": {},
"headers": {
"Accept": "application/json",
"Authorization": "Bearer (My Accesstokn)",
"Host": "
googleads.googleapis.com",
"Content-Type": "application/json",
"developer-token": "(developer token from manager account(test access))"
},
"body": {
"operations": [
{
"create": {
"name": "An example campaign",
"status": "PAUSED",
"campaignBudget": "customers/campaignBudgets/12qw",
"advertisingChannelType": "SEARCH",
"networkSettings": {
"targetGoogleSearch": true,
"targetSearchNetwork": true,
"targetContentNetwork": true,
"targetPartnerSearchNetwork": false
},
"target_spend": {}
}
}
]
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
},
Response :
"response": {
"statusCode": 400,
"body": {
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"operations\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "
type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"operations\": Cannot find field."
}
]
}
]
}
},
"headers": {
"vary": "X-Origin, Referer, Origin,Accept-Encoding",
"content-type": "application/json; charset=UTF-8",
"date": "Thu, 18 Aug 2022 13:07:04 GMT",
"server": "ESF",
"cache-control": "private",
"x-xss-protection": "0",
"x-frame-options": "SAMEORIGIN",
"x-content-type-options": "nosniff",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":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\"",
"accept-ranges": "none",
"connection": "close",
"transfer-encoding": "chunked"
},
Please Help me with the issue.
Thanks and regards,
Sudarshan