---
title: "Play an inbound attachment without exposing messaging credentials"
description: "Resolves only a saved inbound message in the requested workspace. Requires current workspace membership, contact visibility and a server-signed attachment provenance marker from a verified provider webhook. Provider media is limited to 50 MiB and fetched with server-side authentication."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › LiveChat

`GET /api/livechat/messages/{messageId}/media/{mediaIndex}`

Resolves only a saved inbound message in the requested workspace. Requires current workspace membership, contact visibility and a server-signed attachment provenance marker from a verified provider webhook. Provider media is limited to 50 MiB and fetched with server-side authentication.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `messageId` (`get/api/livechat/messages/messageId/media/mediaIndex.path.messageId`; string, required)
  - format `uuid`
- `mediaIndex` (`get/api/livechat/messages/messageId/media/mediaIndex.path.mediaIndex`; integer, required)
  - min 0

## Query parameters

- `workspaceId` (`get/api/livechat/messages/messageId/media/mediaIndex.query.workspaceId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.channelautomation.com/api/livechat/messages/<messageId>/media/<mediaIndex>?workspaceId=string' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/livechat/messages/<messageId>/media/<mediaIndex>?workspaceId=string';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/livechat/messages/<messageId>/media/<mediaIndex>?workspaceId=string"

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

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

print(response.text)
```

## Responses

### 200

Private image, video or audio bytes

#### Example

```text
string
```

### 400

Invalid workspace

### 401

Verified user session required

### 403

Membership

### 404

Saved inbound attachment not found

### 413

Attachment exceeds playback size limit

### 415

Unsupported media format

### 502

Provider media unavailable

### 503

Access verification unavailable


Source: https://developer.channelautomations.com/api/get-api-livechat-messages-message-id-media-media-index/index.md
