---
title: "Get a community channel"
---

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

# Get a community channel

Path: Nicer API › Community

`GET /community/channels/{channelId}`

URL: `https://api.nicer.travel/community/channels/{channelId}`

Returns one channel of the agency's community with its memberCount, the userIds of its members, and its writers: its creator (isCreator) and anyone granted posting on a creator-only channel. A public channel answers to anyone in the agency, a private one only to its members. Errors: 404 ERROR_ITEM_NOT_FOUND for a channel there is not; 400 ERROR_UNAUTHORIZED for a channel of another agency or a private channel the caller is not in; 400 ERROR_COMPANY_REQUIRED and 403 ERROR_DO_NOT_HAVE_PERMISSION as on every community route.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `channelId` (`community.channels.get.path.channelId`; string, required)

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.community.channels.get({
  "channelId": "string"
});
```

### Nicer CLI

```bash
nicer community channels get --channel-id 'string'
```

### cURL

```bash
curl --request GET \
  --url 'https://api.nicer.travel/community/channels/<channelId>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/community/channels/<channelId>';
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.nicer.travel/community/channels/<channelId>"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "channel": {
    "channelId": "string",
    "companyName": "string",
    "name": "string",
    "description": "string",
    "private": true,
    "writePolicy": "all-members",
    "createdBy": "string",
    "createdAt": "string",
    "memberCount": -9007199254740991
  },
  "members": [
    {
      "userId": "string"
    }
  ],
  "writers": [
    {
      "userId": "string",
      "isCreator": true
    }
  ]
}
```

- `channel` (`community.channels.get.response.200.channel`; object, required)
  - `channelId` (`community.channels.get.response.200.channel.channelId`; string, required) — The channel's id.
  - `companyName` (`community.channels.get.response.200.channel.companyName`; string, required) — The agency the channel belongs to.
  - `name` (`community.channels.get.response.200.channel.name`; string, required) — The channel's name.
  - `description` (`community.channels.get.response.200.channel.description`; any of, required) — What the channel is for; null when it says nothing.
    - any of the following: `string`, `null`
  - `private` (`community.channels.get.response.200.channel.private`; boolean, required) — Whether the channel is invite-only. A public channel is open to everyone in the agency.
  - `writePolicy` (`community.channels.get.response.200.channel.writePolicy`; string, required) — Who may post: all-members, or creator-only for its creator and the writers granted posting.
    - one of `"all-members"`, `"creator-only"`
  - `createdBy` (`community.channels.get.response.200.channel.createdBy`; string, required) — The userId of the person who created the channel.
  - `createdAt` (`community.channels.get.response.200.channel.createdAt`; string, required) — When the channel was created, as ISO 8601 text.
  - `memberCount` (`community.channels.get.response.200.channel.memberCount`; integer, optional) — How many people are in the channel. Only getting and creating a channel answer it.
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
- `members` (`community.channels.get.response.200.members`; array of object, required) — Everyone in the channel.
  - `userId` (`community.channels.get.response.200.members.userId`; string, required) — The member's userId.
- `writers` (`community.channels.get.response.200.writers`; array of object, required) — Who may post when only some may: the creator, and anyone granted posting on a creator-only channel.
  - `userId` (`community.channels.get.response.200.writers.userId`; string, required) — The writer's userId.
  - `isCreator` (`community.channels.get.response.200.writers.isCreator`; boolean, required) — Whether the writer is the channel's creator, who always may post.

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.get.response.400.errorCode`; string, required)
- `errorMessage` (`community.channels.get.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.get.response.401.errorCode`; string, required)
- `errorMessage` (`community.channels.get.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.get.response.403.errorCode`; string, required)
- `errorMessage` (`community.channels.get.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Community/community.channels.get/index.md
