> ## 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.
# Read Channel Messages Anonymously
> Fetch the messages in a public channel to an anonymous user. You must enable `Accounts_AllowAnonymousRead` setting in the workspace.
### Changelog
| Version | Description |
| ------- | ------------------------- |
|9.0.0 | Removed the `fields` and `query` parameters. |
| 1.2.0 | Added |
## OpenAPI
````json GET /api/v1/channels.anonymousread
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Rooms"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Channels"
},
{
"name": "Directory"
},
{
"name": "Groups"
},
{
"name": "Rooms"
},
{
"name": "Teams"
},
{
"name": "Room Invites"
},
{
"name": "Subscriptions"
},
{
"name": "ABAC"
}
],
"paths": {
"/api/v1/channels.anonymousread": {
"get": {
"tags": [
"Channels"
],
"summary": "Read Channel Messages Anonymously",
"description": "Fetch the messages in a public channel to an anonymous user. You must enable `Accounts_AllowAnonymousRead` setting in the workspace.\n\n### Changelog\n| Version | Description |\n| ------- | ------------------------- |\n|9.0.0 | Removed the `fields` and `query` parameters. |\n| 1.2.0 | Added |",
"operationId": "get-api-v1-channels.anonymousread",
"parameters": [
{
"$ref": "#/components/parameters/Optional-RoomId"
},
{
"$ref": "#/components/parameters/Optional-RoomName"
},
{
"$ref": "#/components/parameters/offset"
},
{
"$ref": "#/components/parameters/count"
},
{
"$ref": "#/components/parameters/sort"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"t": {
"type": "string"
},
"msg": {
"type": "string"
},
"groupable": {
"type": "boolean"
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"blockId": {
"type": "string"
},
"callId": {
"type": "string"
},
"appId": {
"type": "string"
}
}
}
},
"ts": {
"type": "string"
},
"u": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"username": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"rid": {
"type": "string"
},
"_updatedAt": {
"type": "string"
},
"urls": {
"type": "array",
"items": {
"type": "object"
}
},
"mentions": {
"type": "array",
"items": {
"type": "object"
}
},
"channels": {
"type": "array",
"items": {
"type": "object"
}
},
"md": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
}
}
}
}
},
"count": {
"type": "integer"
},
"offset": {
"type": "integer"
},
"total": {
"type": "integer"
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"messages": [
{
"_id": "xadufzmxzYQp4H9py",
"alias": "test",
"msg": "Example message",
"attachments": [],
"parseUrls": true,
"bot": {
"i": "MnQyfhWt5LqZotyfc"
},
"groupable": false,
"ts": "2018-10-05T01:10:47.524Z",
"u": {
"_id": "rocket.cat",
"username": "rocket.cat",
"name": "Rocket.Cat"
},
"rid": "GENERAL",
"_updatedAt": "2018-10-05T13:42:51.163Z",
"reactions": {
":grin:": {
"usernames": [
"marco.zoo"
]
}
},
"mentions": [],
"channels": [],
"starred": {
"_id": "KPkEYwKKBKZnEEPpt"
}
},
{
"_id": "id-1538701845987",
"rid": "GENERAL",
"msg": "This message was edited via API",
"alias": "Gruggy",
"emoji": ":smirk:",
"avatar": "http://res.guggy.com/logo_128.png",
"attachments": [
{
"collapsed": false,
"color": "#ff0000",
"text": "Yay for gruggy!",
"ts": "2016-12-09T16:53:06.761Z",
"message_link": "https://google.com",
"thumb_url": "http://res.guggy.com/logo_128.png",
"author_name": "Bradley Hilton",
"author_link": "https://rocket.chat/",
"author_icon": "https://avatars.githubusercontent.com/u/850391?v=3",
"title": "Attachment Example",
"title_link": "https://youtube.com",
"title_link_download": true,
"image_url": "http://res.guggy.com/logo_128.png",
"audio_url": "http://www.w3schools.com/tags/horse.mp3",
"video_url": "http://www.w3schools.com/tags/movie.mp4",
"fields": [
{
"short": true,
"title": "Test",
"value": "Testing out something or other"
},
{
"short": true,
"title": "Another Test",
"value": "Link something and this and that."
}
]
}
],
"ts": "2018-10-05T01:10:45.994Z",
"u": {
"_id": "rocketchat.internal.admin.test",
"username": "rocketchat.internal.admin.test",
"name": "RocketChat Internal Admin Test"
},
"_updatedAt": "2018-10-05T01:10:47.064Z",
"editedBy": {
"_id": "rocketchat.internal.admin.test",
"username": "rocketchat.internal.admin.test"
},
"editedAt": "2018-10-05T01:10:46.384Z",
"reactions": {
":smile:": {
"usernames": [
"rocketchat.internal.admin.test"
]
},
":squid:": {
"usernames": [
"rocketchat.internal.admin.test"
]
},
":bee:": {
"usernames": [
"rocketchat.internal.admin.test"
]
},
":ant:": {
"usernames": [
"rocketchat.internal.admin.test"
]
}
},
"mentions": [],
"channels": [],
"urls": []
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Example 1": {
"value": {
"success": false,
"error": "The required \"roomId\" or \"roomName\" param provided does not match any channel [error-room-not-found]",
"errorType": "error-room-not-found"
}
}
}
}
}
}
}
}
}
},
"components": {
"parameters": {
"Optional-RoomId": {
"name": "roomId",
"in": "query",
"description": "The room ID. It is required if the `roomName` is not provided.",
"schema": {
"type": "string"
},
"example": "dlpfuijw7ej"
},
"Optional-RoomName": {
"name": "roomName",
"in": "query",
"description": "The room name. It is required if the `roomId` is not provided.",
"required": false,
"schema": {
"type": "string"
},
"example": "general"
},
"offset": {
"name": "offset",
"in": "query",
"description": "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.",
"required": false,
"schema": {
"type": "integer"
},
"example": 50
},
"count": {
"name": "count",
"in": "query",
"description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.",
"required": false,
"schema": {
"type": "integer"
},
"example": 50
},
"sort": {
"name": "sort",
"in": "query",
"description": "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.",
"required": false,
"schema": {}
}
},
"schemas": {
"Attachment": {
"type": "object",
"properties": {
"ts": {
"type": "string",
"example": "1970-01-01T00:00:00Z"
},
"title": {
"type": "string"
},
"title_link": {
"type": "string"
},
"title_link_download": {
"type": "boolean"
},
"image_dimensions": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"example": 444
},
"height": {
"type": "integer",
"example": 360
}
}
},
"image_preview": {
"type": "string",
"example": "/9j/2wBDAAYEBQ..."
},
"image_url": {
"type": "string",
"example": "/file-upload/PNTaE9SBQasdpAwk2/img_1.jpg"
},
"image_type": {
"type": "string",
"example": "image/jpeg"
},
"image_size": {
"type": "integer",
"example": 26674
},
"type": {
"type": "string",
"example": "file"
},
"description": {
"type": "string",
"example": ""
}
}
}
}
}
}
````