Hello everyone,
I am trying to fetch query results through HTTP/JSON Combination in Google Ads API. I am making the request from Google Apps Script. However, I am consistently getting an error code "UNEXPECTED_END_OF_QUERY" for all syntax of Query. Strangely, even when I delete the query statement, I get the same error. Can you please help me identify the cause of error and resolve the same?
-----------------------------------CODE-----------------------------------------------------------------
var options = {
'headers':headers,
'method':'post',
'muteHttpExceptions':true,
"Parameters": data
};
var response = UrlFetchApp.fetch(url, options);
Logger.log(response.getContentText());
---------------------------------RESPONSE ERROR---------------------------------------------------------------
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.ads.googleads.v2.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"queryError": "UNEXPECTED_END_OF_QUERY"
},
"message": "Error in query: unexpected end of query."
}
]
}
]
}
}
--------------------------------------------------------------------
Would appreciate help on this. Thanks