Paginating /api/v2/analytics/conversations/details/query keeps dropping records

The compliance export script hits /api/v2/analytics/conversations/details/query and pulls the first batch fine, but the next call throws a 400 Bad Request when I pass the nextPageToken. I’m trying to figure out if this endpoint actually uses cursor pagination or if I should be switching to page and pageSize parameters instead. Here’s the request loop we’re running:

while response.get('nextPageToken'):
 params['nextPageToken'] = response['nextPageToken']
 response = requests.get(url, headers=headers, params=params).json()

It just keeps failing on the second iteration.