~/go/bin/oauth2l header --json PATH_TO_CREDENTIALS https://www.googleapis.com/auth/admob.readonly
All the best,
|
||||||
curl -X POST https://admob.googleapis.com/v1/accounts/pub-*************/networkReport:generate -H "Content-Type: application/json" -H "$(~/go/bin/oauth2l header --json credentials.json https://www.googleapis.com/auth/admob.readonly)" --data @- << EOF { "report_spec":{ "date_range": { "start_date": {"year": 2022, "month": 12, "day": 1}, "end_date": {"year": 2022, "month": 12, "day": 1} }, "dimensions": ["DATE", "AD_UNIT", "APP", "COUNTRY", "FORMAT", "PLATFORM" ], "metrics": ["AD_REQUESTS", "CLICKS", "ESTIMATED_EARNINGS", "IMPRESSIONS", "IMPRESSION_CTR", "MATCHED_REQUESTS", "MATCH_RATE"] } } EOF
Please let me know if this does not resolve your issue.
All the best,



{
"reportSpec": {
"dateRange": {
"startDate": {
"year": 2023,
"month": 1,
"day": 1
},
"endDate": {
"year": 2023,
"month": 1,
"day": 1
}
},
"dimensions": [
"DATE",
"AD_UNIT",
"APP",
"COUNTRY",
"FORMAT",
"PLATFORM"
],
"metrics": [
"AD_REQUESTS",
"CLICKS",
"ESTIMATED_EARNINGS",
"IMPRESSIONS",
"IMPRESSION_CTR",
"MATCHED_REQUESTS",
"MATCH_RATE"
]
}
}
curl -X GET https://admob.googleapis.com/v1/accounts/pub-************* -H "Content-Type: application/json" -H "$(~/go/bin/oauth2l header --json credentials.json https://www.googleapis.com/auth/admob.readonly)"