Hey folks,
Hitting a weird wall with the CXone API today. I’m trying to programmatically check the login state of a specific agent using GET /api/v2/agents/states. The request returns a 200 OK, but the payload is just an empty array [].
Weird part is, the agent is definitely logged in on the desktop client. I can see them in the queue. I’ve tried adding the agentId query param and even the locationId, but nothing changes. Here’s the basic curl I’m running for testing:
curl -X GET "https://platform.niceincontact.com/api/v2/agents/states?agentId=123456" \
-H "Authorization: Bearer <valid_token>"
Response:
[]
I’ve double-checked the OAuth scopes on the client app. It has agent:read and user:read. The token is fresh, generated just seconds before the call. I’ve also tried hitting the endpoint with no filters to get all states, still comes back empty.
Has anyone seen this? Is there a specific permission I’m missing or a known bug with this endpoint? Feels like a scope issue but I’ve been staring at the docs for an hour and can’t spot it.