I’m hitting a wall with the CXone API again. Trying to pull the current state of a specific agent via the REST proxy in a script. The agent is definitely logged in and working the queue, confirmed via the web UI.
The call looks like this:
GET /api/v2/agents/states/{agentId}
Headers are standard, including the Bearer token generated earlier in the flow. The response comes back with a 200 OK, but the body is just:
[]
Empty array. No state info. No error message.
I’ve checked the division scope on the OAuth client, matches the agent’s division. Tried passing the includeArchived param, no change. Even tried fetching the list of all agents and filtering, same result for this specific ID. Other agents in the same queue return the expected JSON object with state and since fields.
Is there a known issue with this endpoint returning empty for agents in certain states? Or am I missing a required header that isn’t documented? The token is fresh, validated via the introspect endpoint.