> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Last user activity

GET https://{tenant_name}.benchling.com/api/v2/users/{user_id}/activity

Returns activity metadata for a specific user by ID. This currently includes lastSeen data.


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/users/get-user-activity

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `user_id` (string, required) — ID of user to get

## Response

### 200

OK

- `lastSeen` (datetime, optional, nullable)
- `userId` (string, optional)

## Errors

### 404 Not Found Error

Not Found

- `error` (NotFoundErrorError, optional)

## Types

### NotFoundErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)
- `invalidId` (string, optional)

## Examples

**Response**

```json
{
  "lastSeen": "2024-01-15T09:30:00Z",
  "userId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/users/user_id/activity"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/users/user_id/activity';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```