# Get User Device Activity

### API Documentation

#### API Route

`{{apiBase}}/v2/device/user_activity/{userid}`

#### Authentication

* **Required**: Yes
* **Method**: Send the API key as `APIKEY` in the request headers.

#### Request Details

* **Method**: GET

**Path Parameters:**

* **userid**: (Required) User ID to specify.

**Optional Query Parameters:**

* **sso**: Single Sign-On (SSO) value.

#### Responses

**Success:**

```json
{
    "status": 200,
    "timestamp": 1694597541,
    "time": 1.05,
    "ip": "182.187.142.133",
    "message": "User activity found",
    "data": [
        {
            "userid": "303",
            "session_id": "1694594281495105451",
            "app": "androidtv_app",
            "os": "android",
            "device_type": "tv",
            "device_name": "google sdk_google_atv64_amati_arm64",
            "timestamp": "13 September 2023 08:38:01 AM",
            "count": 4,
            "device_uuid": "STT9.221129.002",
            "last_active": "1 minute ago",
            "content_id": "5207",
            "content_type": "1",
            "activity_status": "not active"
        }, {...}
    ]
}
```

**Error: No User Activity Found**

```json
{
    "status": 400,
    "timestamp": 1694597529,
    "time": 1.078,
    "ip": "182.187.142.133",
    "message": "No user activity found",
    "error_code": "resource_not_found",
    "data": []
}
```

**Error: No User Found**

```json
{
    "status": 400,
    "timestamp": 1694597325,
    "time": 0.126,
    "ip": "182.187.142.133",
    "message": "No user found",
    "error_code": "resource_not_found",
    "data": []
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vodlix.com/developer-guide/api-documentation/get-user-device-activity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
