I am ingesting usage data from the Usage API. The ingest has been running fine for the past 6 months or so. Last week it started throwing 400 errors with The page token is invalid, have you modified the query parameters?.
I have tripple-checked and the page parameter is being passed correctly between the requests.
@aprendendo.next I am not sure I understand it. Your request is not using pagination at all. I am pulling data from the past few months, ending with whatever the latest record is
@lukas.toma It is paginating, there is just no need to post my code doing that. The point is, the error seems to be solved when you enlarge the time window in the initial request.
In my case, despite requesting to start 2 days ago with a limit of 2 days (start time), I ask for 3 days(limit), and the problem was gone.
Nonetheless, it still is an undesired behavior from the usage API.
I am using the 31 day limit (which is the max for the 1d time window). I tried using smaller limits just to be sure and the error persists. As my original timestamp is more than the maximum allowed limit, I am not sure how to apply your solution. I need to query X limit repeatedly until it reaches the newest records, but the pagination does not work as expected.
I am also experiencing this behavior. I had a script to report on usage data that no longer works. I have a case open with support, which has been escalated to the engineering team, but I haven’t heard anything back yet.