---
title: "Get Channel Files"
slug: "get-channel-files"
updated: 2026-09-03T14:50:33Z
published: 2026-09-03T14:50:33Z
canonical: "developer.rocket.chat/get-channel-files"
stale: true
---
> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Get Channel Files
Get/api/v1/channels.files
Retrieves all the media files from a channel.
### Changelog
| Version | Description |
| --- | --- |
| 0.64.0 | Change userId to user object in response |
| 0.59.0 | Added |
Header parametersX-User-IdstringRequired
The `userId` of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
X-Auth-TokenstringRequired
The `authToken` of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Query parametersroomIdstring
The room ID. It is required if the `roomName` is not provided.
Exampledlpfuijw7ej
roomNamestring
The room name. It is required if the `roomId` is not provided.
Examplegeneral
fieldsstring
This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: `fields={ "username": 1 }`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more.
query
This parameter allows you to use MongoDB query operators to search for specific data. For example, to query users with a name that contains the letter "g": `query={ "name": { "$regex": "g" } }`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more.
sort
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.
countinteger
The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.
Example50
offsetinteger
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.
Example50
typeGroupstring
Filter results by the type of file. Available options:
- `all`: Return all file types.
- `image`: Filter by image files.
- `video`: Filter by video files.
- `audio`: Filter by audio files.
- `text`: Filter by text documents.
- `application`: Filter by other file types.
Exampleimages
namestring
The name of the file to search for.
Examplelogo
Responses200
OK
Example
```json
{
"files": [
{
"_id": "651227bea2f73c7460e18c63",
"name": "Screenshot (317).png",
"size": 288727,
"type": "image/png",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-09-26T00:37:19.598Z",
"identify": {
"format": "png",
"size": {
"width": 1920,
"height": 1080
}
},
"complete": true,
"etag": "2Q2D8hSxCdhQLzcpx",
"path": "/ufs/GridFS:Uploads/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"progress": 1,
"token": "da2aCAf88a",
"uploadedAt": "2023-09-26T00:37:18.168Z",
"uploading": false,
"url": "http://localhost:3000/ufs/GridFS:Uploads/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"typeGroup": "image",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
},
{
"_id": "64b589e6aa5ad4273bfc4db6",
"name": "eicar.zip",
"size": 266,
"type": "application/x-zip-compressed",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-07-17T18:35:18.242Z",
"complete": true,
"etag": "JYaAzzFQSnxYQ7rWW",
"path": "/ufs/GridFS:Uploads/64b589e6aa5ad4273bfc4db6/eicar.zip",
"progress": 1,
"token": "7a1A38Cb5a",
"uploadedAt": "2023-07-17T18:35:18.216Z",
"uploading": false,
"url": "http://localhost:3000/ufs/GridFS:Uploads/64b589e6aa5ad4273bfc4db6/eicar.zip",
"typeGroup": "application",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
```
Expand Allobject files Array of object object _idstring
namestring
sizeinteger
typestring
ridstring
userIdstring
storestring
_updatedAtstring
identifyobject formatstring
sizeobject widthinteger
heightinteger
completeboolean
etagstring
pathstring
progressinteger
tokenstring
uploadedAtstring
uploadingboolean
urlstring
typeGroupstring
userobject _idstring
usernamestring
namestring
countinteger
offsetinteger
totalinteger
successboolean