# Retrieve CMS Channels with a Connected App

Before you can retrieve CMS content, you need the ID of a CMS channel that has access to the content. Use the Connect REST API’s CMS delivery channels resource to get a list of CMS channels with a connected app. If the request is successful, the response contains a JSON object with the available channels.

## API Request Details

To send an API call to get CMS channels, make an HTTP GET request to the `/services/data/v{XX.X}/connect/cms/delivery/channels` resource.

### Headers

Include an Authorization header with the value `Bearer {access_token}`, where *access_token* is your CMS access token. Optionally, specify the response format with a Content-Type header.

### Sample Request

This Node.js sample requests the CMS channels from CMS.

````
```javascript
const auth = require("./sf-crm-auth");

const fetch = require("node-fetch");
const { URLSearchParams } = require("url");

const url = "/services/data/v54.0/connect/cms/delivery/channels";

module.exports = async function () {
  const channels = await getChannelsList();
  return channels.channels;
};

async function getChannelsList() {
  return new Promise((resolve, reject) => {
    auth().then((token) => {
      const meta = {
        "Content-Type": "application/json",
        Authorization: `Bearer ${token.access_token}`,
      };

      const urlToUse = `${token.instance_url}${url}`;
      fetch(urlToUse, {
        method: "GET",
        headers: meta,
      })
        .then((res) => res.json())
        .then((json) => resolve(json))
        .catch((err) => {
          console.log({ err });
          reject(err);
        });
    });
  });
}
```
````

## API Response

In response to the API request, the API returns an HTTP response code and a JSON body with an object containing the available channels and pagination details.

This sample shows the response body from the previous sample request to retrieve channels.

```javascript

{
    "channels": [
        {
            "channelId": "0ap5w000000kcaiAAA",
            "channelName": "NTO Reference App",
            "channelType": "ConnectedApp",
            "isChannelSearchable": true
        }
    ],
    "currentPageUrl": "/services/data/v54.0/connect/cms/delivery/channels?page=0&pageSize=25",
    "nextPageUrl": null,
    "previousPageUrl": null,
    "totalChannels": 1
}

```

## See Also

- [*Connect REST API Developer Guide*: CMS Delivery Channels](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_managed_content_delivery_channels.htm)
