Cursor pagination returning 400 on second request for /api/v2/analytics/conversations/details/query

Hey everyone,

Running into a weird issue with the analytics API. I’m writing a Python script to pull detailed conversation logs for our WFM adherence reports. The first request works fine, but when I try to use the cursor from the response for the next page, I get a 400 Bad Request.

Here’s the basic flow:

response = requests.get(url, headers=headers, params=params)
data = response.json()
cursor = data.get('cursor')

# Second request
params['cursor'] = cursor
response2 = requests.get(url, headers=headers, params=params)

The error message says something about an invalid cursor format, but it’s just a string from the previous response. I’ve checked the docs, and it seems like I should just append the cursor to the query params. Am I missing something about how the cursor expires or gets formatted? It’s pretty frustrating since I need to paginate through thousands of records.

Any ideas?