GET /api/v2/agents/states returns empty array for logged-in user

Trying to verify agent status in a script using the REST Proxy. The goal is simple: check if the agent handling the current interaction is actually logged in before proceeding.

The endpoint is GET /api/v2/agents/states. I’m passing the agentId from GetInteractionData().agent.id. The call succeeds with a 200 OK, but the body is always an empty array []. This happens even when I can see the agent in the Admin UI with a green status.

Here is the logic:

ASSIGN agentId = GetInteractionData().agent.id
ASSIGN rest = GetRESTProxy()
ASSIGN response = rest.Get("/api/v2/agents/states", {"agentId": agentId})

I checked the headers. Authorization is fine since other calls work. Tried adding divisionId just in case, no change. The docs say it returns an array of states. If the array is empty, does that mean the agent isn’t associated with any division? Or is there a specific scope needed for this endpoint in the OAuth token?

Also tried calling it directly from Postman with the same token and got the same empty result. Feels like a permission issue but not sure which one. Any idea what’s missing here?