# Retrieve a Specific User's Chat History

Start by calling on our trusty /[Get messages](<https://whapi.readme.io/reference/getmessages >) method. This will allow you to view the user's available message history.

Need something more specific? The /[Get messages by chat ID](https://whapi.readme.io/reference/getmessagesbychatid) method is your go-to for extracting chat history from a particular dialogue. If you're hunting for a specific message, then the /Get message method is the tool for you.

While making use of these methods, don't forget to incorporate the Chat ID parameter:

Use <15301234567@s.whatsapp.net> or xxxxxxxxxx\@LID for individual chats, and <1203574073754@g.us> when you're dealing with group chats.

{% hint style="info" %}
[Chat ID. What is it and how do I get it?](/help-desk/faq/chat-id.-what-is-it-and-how-to-get-it.md)
{% endhint %}

{% hint style="info" %}
[Learn more about @LID identifiers](/help-desk/faq/whatsapp-lid-lid.md)
{% endhint %}

{% embed url="<https://whapi.readme.io/reference/getmessages>" %}

{% embed url="<https://whapi.readme.io/reference/getmessagesbychatid>" %}


---

# 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/receiving/http-api/retrieve-a-specific-users-chat-history.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.
