I've managed to get API working but it is reporting numbers which are always a bit lower than the ones reported by AdSense web (or mobile app) interface.
This is the response from API explorer:
"kind": "adsense#report",
"totalMatchedRows": "1",
"headers": [
{
"name": "EARNINGS",
"type": "METRIC_CURRENCY",
"currency": "EUR"
},
{
"name": "CLICKS",
"type": "METRIC_TALLY"
}
],
"rows": [
[
"7.58",
"17"
]
],
"totals": [
"7.58",
"17"
],
"averages": [
"7.58",
"17"
],
"startDate": "2019-10-07",
"endDate": "2019-10-07"
}
For example, for two days ago (2019-10-07) web interface is showing 24 clicks with estimated earning of 7,65 EUR and when I call API for the same day it shows 17 clicks and earning of 7,58 EUR.
And for every other day numbers are lower than the ones on the web interface.