unable to fetch AD_SROUCE

25 views
Skip to first unread message

Zeyuan Li

unread,
Aug 20, 2024, 5:55:02 PM 8/20/24
to AdMob API Developer Forum
I am unable to fetch AD_SROUCE through the API:
here is the request, error code is 400, 
    "code": 400,
    "message": "Invalid value at 'report_spec.dimensions[0]' ( type.googleapis.com/google.ads.admob.v1.NetworkReportSpec.Dimension ), \"AD_SOURCE\"",

if I remove  AD _ SOURCE , everything goes well..
but I need this field, and It is showed in the API document, any one can help?

request = {
"report_spec" : {
"date_range" : {
"start_date" : { "year" : 2024 , "month" : 8 , "day" : 1 },
"end_date" : { "year" : 2024 , "month" : 8 , "day" : 1 }
},
"dimensions" : [ "DATE" , "AD_SOURCE" , "APP" , "COUNTRY" , "PLATFORM" , "AD_UNIT" , "FORMAT" ],
"metrics" : [ "ESTIMATED_EARNINGS" , "CLICKS" , "IMPRESSIONS" , "AD_REQUESTS" , "MATCHED_REQUESTS" ],
"localization_settings" : { "currency_code" : "USD" , "language_code" : "en-US" },

"dimension_filters" : [
{
'dimension' : 'COUNTRY' ,
'matches_any' : {
'values' : [ 'US' ]
}
}
]
}}
Reply all
Reply to author
Forward
0 new messages