# Get Real-Time Agent Status

## <span style="color: rgb(2, 106, 73);">**API: getLiveAgentInfo**</span>

###  **Description**

Retrieves real-time status information for a specific agent. This includes the agent's current activity (e.g., READY, IN CALL,, DISPOSITION, PAUSE - BREAK or LUNCH BREAK,), call details, and campaign context if the agent is handling a live call.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goUsers/goAPI.php

<p class="callout info align-left">**Note:** Replace `DOMAIN` with the specific domain you want to query.</p>

### **📝 Required Parameters**  


<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%; height: 178.667px;"><colgroup><col style="width: 23.0031%;"></col><col style="width: 20.0234%;"></col><col style="width: 56.9715%;"></col></colgroup><thead><tr style="height: 29.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">getLiveAgentInfo</td><td style="height: 29.6px;">Action to retrieve live status and call info for a specific user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Password for the API authorized user.</td></tr><tr><td style="height: 29.6px;">user</td><td style="height: 29.6px;">example.user</td><td style="height: 29.6px;">The username of the agent to check live info for.</td></tr><tr style="height: 30.6667px;"><td style="height: 30.6667px;">responsetype</td><td style="height: 30.6667px;">json/xml</td><td style="height: 30.6667px;">Format of the response (`json` recommended).</td></tr></tbody></table>

**Note:** This endpoint uses body parameters for authentication instead of tokens or headers.

### **Request Examples:**

#### **GET:** 

```bash
curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goUsers/goAPI.php?goAction=getLiveAgentInfo&goUser=MyUser&goPass=MyPass&user=example.user&responsetype=json"
```

#### **POST:**

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goUsers/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=getLiveAgentInfo" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "user=Example.User"

```

####  **Example Response Agent READY**

```json
{
  "result": "success",
  "data": {
    "status": "READY",
    "color": "primary",
    "in_call_with": "",
    "campaign_id": "",
    "campaign_name": "",
    "call_type": "",
    "caller_id": "",
    "conf_exten": "8600118",
    "server_ip": "127.0.0.1",
    "vendor_lead_code": "",
    "lead_id": 0
  }
}
```

####  **Example Response Agent IN CALL** 

```json
{
  "result": "success",
  "data": {
    "status": "IN CALL",
    "color": "green",
    "in_call_with": "1234567890",
    "campaign_id": "CAMP001",
    "campaign_name": "EXAMPLE_CAMPAIGN",
    "call_type": "DIALER",
    "caller_id": "9876543210",
    "conf_exten": "8600118",
    "server_ip": "127.0.0.1",
    "vendor_lead_code": "abc123-xyz456",
    "lead_id": 7890123
  }
}
```