Agent authentication API is used to log in or log out agents from the system. This API method helps in the virtual logging in of agents, where the agent will be able to receive online calls similar to the way when the agent is logged in through UI.
Authorization parameters
At the top right, under CREDENTIALS, provide the following parameters.
Parameter | Description |
---|---|
username* | Agent ID |
password* | Agent password |
Note
- This API is applicable to virtually log in or log out the agents in offline scenarios. This will NOT login the agents on the toolbar UI (whether it is Ozonetel toolbar or embedded iframe)
- A phone number is required to login the agent, but not necessary while passing a logout request.
- The action parameter value is not case-sensitive.
- Parameters with ‘*’ are considered to be mandatory parameters.
Possible Responses
Success login response | "status": "success" "message": "Agent XXXXXX logged in successfully" |
Success logout response | "status": success" "message": "Agent XXX logged out successfully" |
Invalid userName | "status": "error" "message": "Invalid userName or apiKey" |
Invalid apiKey | "status": "error" "message": "Invalid userName or apiKey" |
Invalid AgentID | "status": "error" "message": "Invalid Authentication" |
Agent not logged in | "status": "error" "message": "Agent XXXX is not logged in" |
Agent already logged in | "status": "error" "message": "Agent has already logged in" |
Invalid Agent Password | "status": "error" "message": "Invalid Authentication" |
Another agent logged in with same phone number | "status": "error" "message": "XXXXXX logged in with the number (+91XXXXX)" |