CXone /agents/states returning empty array despite agent being logged in

Is there a specific scope or header I’m missing when calling the CXone GET /agents/states endpoint?

I’m trying to build a simple health check script in Python using the requests library. The goal is just to see if an agent is currently logged into the platform. The agent is definitely logged in on the web interface, and I can see them as ‘Available’ in the supervisor dashboard.

When I hit the endpoint, I get a 200 OK response, but the body is just an empty JSON array. Here’s the payload:

[]

I’m using the standard OAuth client credentials flow to get the token. The token looks valid because other endpoints work fine. My code looks something like this:

headers = {
 'Authorization': f'Bearer {token}',
 'Accept': 'application/json',
 'Content-Type': 'application/json'
}
response = requests.get(f'https://{org_id}.api.nice.incontact.com/RestAPI/v1.0/agents/states', headers=headers)
print(response.json())

I’ve tried adding the agent_id query parameter, but it still returns empty. I’ve checked the permissions on the service account, and it has full admin rights. It’s a bit confusing because the documentation suggests this should return the current state object. Is there a different endpoint for just checking login status, or am I doing the request wrong?