# Get messages from Channels

Many of our clients use Whapi.Cloud to extract messages from WhatsApp channels, whether to duplicate posts into other systems or parse competitor or personal channels for real-time updates. In this article, we’ll cover the best ways to retrieve channel messages using webhooks and API endpoints, and explain how to get the most complete data.

### 1. **Using Webhooks for Real-Time Updates**

The most efficient way to receive new posts from a WhatsApp channel is through **webhooks**.

Webhooks allow you to automatically receive **real-time notifications** whenever a new message is posted in a channel. This ensures that you get the most up-to-date content without repeatedly querying the API.

To configure a webhook:

1. Set up a server endpoint that can accept POST requests.
2. Add your webhook URL in the channel settings on Whapi.Cloud.
3. Subscribe to the relevant event types (`POST messages`).

Each time a message is posted in the channel, Whapi.Cloud will send a webhook event to your server with all relevant details about the message.

### **2. Get Newsletter Messages**

* Endpoint: [**Get Newsletter Messages**](https://whapi.readme.io/reference/getmessagesnewsletter)
* This endpoint provides a more complete solution for retrieving messages from channels, including details that may not be available through other methods (e.g., message reactions).

**Why is this better?**\
Unlike the standard "[Get Messages by Chat ID](https://whapi.readme.io/reference/getmessagesbychatid)" this endpoint captures additional metadata and ensures that you receive a more comprehensive view of the channel’s activity.

**When to use:**

* You need the most accurate and detailed data, including reactions.
* You want to ensure that no relevant information is missed when processing messages.

```
curl --request GET \
     --url https://gate.whapi.cloud/newsletters/120363352837965002%40newsletter/messages \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_TOKEN'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/channels/get-messages-from-channels.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
