Reading Instagram DM history: the conversations API
Instagram's Conversations API reads a professional account's DM history on graph.instagram.com. GET /me/conversations?platform=instagram lists the conversations with their updated_time, GET /<CONVERSATION_ID>?fields=messages lists a conversation's messages by ID and time, and GET /<MESSAGE_ID>?fields=id,created_time,from,to,message returns one message. Details are available for the 20 most recent messages in each conversation.
easyCoexistence forwards new Instagram DMs to your endpoint as they arrive and replies with send_social_dm inside the 24-hour window, from Claude, ChatGPT or your own code, on Meta's official API; it has no tool for the Conversations API's history.
Most recent messages per conversation whose details the API returns; older ones answer with an error saying they were deleted.
Inactivity after which conversations in the Requests folder are no longer returned.
Conversations API calls an app can make per second for each Instagram professional account.
instagram_business_basic and instagram_business_manage_messages, on a token from someone who can manage the account's messages.
How do you list an account's conversations?
With GET /me/conversations, or /<IG_ID>/conversations, and platform=instagram, using an Instagram User access token from someone who can manage messages on the account. Each entry in the data array is one conversation, with its id and updated_time.
GET https://graph.instagram.com/me/conversations
?platform=instagram
&access_token=<ACCESS_TOKEN>
{
"data": [
{ "id": "<CONVERSATION_ID>", "updated_time": "<UPDATED_TIME>" }
]
}How do you find the conversation with one person?
Add user_id with the person's Instagram-scoped ID, the IGSID that arrives as sender.id when they message the account, and the response returns that conversation's id. It turns a webhook event into its thread without paging through the whole list.
GET https://graph.instagram.com/me/conversations
?user_id=<IGSID>
&access_token=<ACCESS_TOKEN>How do you read the messages?
In two steps. GET /<CONVERSATION_ID>?fields=messages lists the conversation's messages by id and created_time, the default fields. GET /<MESSAGE_ID> with fields=id,created_time,from,to,message then returns one message: who sent it and to whom, each with a username and an ID, and its text.
GET https://graph.instagram.com/<CONVERSATION_ID>
?fields=messages
&access_token=<ACCESS_TOKEN>
GET https://graph.instagram.com/<MESSAGE_ID>
?fields=id,created_time,from,to,message
&access_token=<ACCESS_TOKEN>How far back can you read?
Meta's guide and overview set four limits on what comes back:
- Message details: the 20 most recent messages in each conversation; asking for an older one returns an error saying it has been deleted.
- Requests: conversations in the Requests folder with no activity for 30 days are not returned.
- Shares: a shared post or Reel comes back as its image or video URL only.
- Rate: 2 calls per second for each Instagram professional account.
What does it need?
With Instagram Login, the instagram_business_basic and instagram_business_manage_messages permissions and a token from someone who can manage messages on the account. Standard Access is enough for accounts you own or manage and have added to the app; serving other accounts takes Advanced Access. The account also has to have Allow access to messages turned on in its Instagram app settings.
Why keep a record from webhooks?
Because the API returns details for only the latest 20 messages of each conversation, a full history has to be stored as it happens. The messages webhook delivers DMs as they arrive, with the person's IGSID as sender.id, and messages the account sends arrive as well, with the IDs the other way round, so both sides of a conversation can be recorded.
How do you read DM history through easyCoexistence?
It forwards DMs rather than reading history. New DMs reach your endpoint as they arrive once you set one with set_social_webhook_destination, passed on without a copy kept, and send_social_dm replies within the 24-hour window, from Claude, ChatGPT or your own code. No tool calls me/conversations, so earlier messages are read in the Instagram app, or kept by your own system as they arrive.
Common mistakes
- Expecting the whole thread from the API. Details stop at the 20 most recent messages, so store DMs from the messages webhook as they arrive.
- Polling conversations for new DMs. The API allows 2 calls per second per account, while the messages webhook delivers each DM as it arrives.
- Looking for an old message request. Conversations in Requests with 30 days of inactivity are no longer returned.
- Reading the deleted error as the person's deletion. Meta answers that way for any message older than the latest 20.
US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Can I export an Instagram account's full DM history?
Not in full through the API: it lists the conversations but returns details for the 20 most recent messages in each. A complete record comes from storing DMs as the webhook delivers them.
Does reading messages through the API mark them as read?
No. Meta says messages delivered through the API are not marked as read in the Instagram app until a reply is sent.
Does the Conversations API work with Instagram Login?
Yes. Meta's guide for it is written for Instagram Login, with calls to graph.instagram.com and the instagram_business_* permissions.
How do I get a person's username from a conversation?
Request from on a message, which returns the sender's username and ID. The User Profile API returns more, such as the name, from their IGSID once they have messaged the account.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on