Daily analytics export to S3 fails with 403 on large date ranges

The daily export script hangs for ten minutes before spitting out a 403 Forbidden when the date range spans more than 48 hours.

Step one: the Python job pulls queue metrics via the genesyscloud SDK, paginates the results, and pushes the JSON blob to an S3 bucket using boto3.

Step two: I’m building the request payload like this: {"interval": "PT1H", "date_from": "2023-10-01T00:00:00.000Z", "date_to": "2023-10-03T00:00:00.000Z"}.

It runs smooth for a single day. The moment the window stretches past two days, the SDK throws that 403 error right at the analytics_api.get_analytics_queues_realtime() call. Weird because the auth token refreshes every hour.

response = analytics_api.get_analytics_queues_realtime(
 interval="PT1H",
 date_from=iso_start,
 date_to=iso_end
)

Step three: Bumping the pageSize parameter didn’t change anything. The error persists. The boto3 upload works fine with dummy data, so the bucket permissions are solid. Not sure if the API has a hidden rate limit on the date window or if I’m missing a header.