EN

Facebook and Messenger API for Your App

Connect your users' Facebook accounts and Pages to your app: Messenger conversations, posts, comments and profiles, through one API.

7-day free trial, no credit card.
Your App
Synced
Anna Rossi ARAnna Rossi
Messages12
Accounts3
Activity
Contacts84
JCJulia Chen
Julia ChenNew
1 min
Coveton Apparel page
Thank you for the quick answer!
LMLucas Meyer
Lucas MeyerOrder
25 min
Personal account
Is the order still on track?
SRSofia Rivera
Sofia RiveraBooking
2h
Green Bowl Cafe page
Can I book a table for Friday?
DMDaniel Martinez
Daniel MartinezSupport
5h
Coveton Apparel page
Thanks, the issue is solved now.
FacebookCoveton ApparelLinked
Conversations 48Unread 6
FacebookGreen Bowl CafeLinked
Conversations 31Unread 4
FacebookAnna Rossi, personal accountLinked
Conversations 22Unread 2
Julia Chen replied to your message
FacebookCoveton Apparel · 1 min ago
Conversation assigned to Carlos Reed
FacebookTeam inbox · 20 min ago
Image sent to Lucas Meyer
FacebookCoveton Apparel · 1h ago
Sofia Rivera tagged as Booking
FacebookGreen Bowl Cafe · 2h ago
JCJulia Chen
Julia ChenSynced
Customer · Coveton Apparel page
Messenger3 conversations
LMLucas Meyer
Lucas MeyerSynced
Customer · Coveton Apparel page
MessengerInstagram
SRSofia Rivera
Sofia RiveraSynced
Customer · Green Bowl Cafe page
Messenger1 conversation
DMDaniel Martinez
Daniel MartinezSynced
Customer · Coveton Apparel page
Messenger2 conversations
await client.messaging.sendMessage("Hi!");
FacebookFacebook API Integration

One API for Facebook and Messenger: Connect Every Account Type

Link personal Facebook accounts and Facebook Pages. Both share the same unified schema for Messaging, Posts and Users.

Personal Facebook Account

Personal Messaging

Connect your users' personal Facebook accounts and sync their Messenger chats, posts and contacts in real time.

Key Use Cases
Unified inbox: centralize personal Messenger chats in your app
Sync contacts and retrieve user profiles
List and publish posts from the user's profile
Messages Posts Users

Facebook Pages

Pages managed by the user

Handle Messenger conversations of the Pages your users manage, with Page posts and the people who write to them.

Key Use Cases
Customer support across several Pages
Shared team inbox for Page messages
Retrieve and publish Page posts
Messages Posts Users
Messenger Messaging API

Efficient Customer Communication: Leveraging Facebook Messenger for Business

Integrate Messenger API into a business software to centralize and streamline customer interactions.

Your App
Synced
MOMichel Opra
Michel Opra
FacebookInstagramGmail+
Message Email Calendar
FacebookMessenger InstagramInstagram GmailGmail
Me · MONDAY, 05:09 PM
Hello Michel, your order has shipped. Here is your delivery receipt.
Me · MONDAY, 05:10 PMFILE
delivery-receipt.pdf84 KB
MOMichel OpraMichel Opra · MONDAY, 07:12 PM
Thank you for the quick answer!
Me · MONDAY, 07:30 PM
Happy to help. Talk soon.
Seen
Reply to Michel via Messenger
LMLucas Meyer
Message delivered Facebook Order update to Lucas
Webhook

Delivery and Read Receipts

Know when each message is delivered and seen, with real-time webhooks.

Centralize in Your CRM

Integrate Facebook Messenger into your existing CRM or other business software.

Multiple Accounts per User

You can link multiple Facebook Messenger accounts per user.

Shared Inbox

Shared Team Inbox

Streamline Messenger conversations from personal accounts and Pages, directly inside your users' CRM.

Unified Control

Oversee and answer messages from personal accounts and multiple Pages in one CRM.

Enhanced Collaboration

Assign conversations so teams collaborate seamlessly and save time.

Data-Driven Insights

Use analytics to shape your content strategy and enhance engagement.

Documentation
Your CRM
SELECT USER
CRCarlos Reed
ISIsabella Stone
JMJavier Mitchell
LBLucia Brooks
Contacts
Conversations
Assigned to
Via
Status
MOMichel Opra
Michel OpraOK, perfect.
CRCarlos
Facebook
Replied
SRSofia Rivera
Sofia RiveraI just saw your message.
ISIsabella
Facebook
New
DMDaniel Martinez
Daniel MartinezThanks for the proposal!
CRCarlos
Facebook
Pending
GLGabriel Lopez
Gabriel LopezI will be a great yes!
Unassigned
WhatsApp
Awaiting
EGElena Garcia
Elena GarciaDear Sarah,
JMJavier
Outlook
Resolved
Your CRM
···
SBSarah Brown
Sarah Brown
FacebookInstagramGmail+
InboxPagesTags
4 accounts linkedAll messages in one CRM
Facebook Pages

Unified Messaging Management: Handling Multiple Facebook Pages with Messenger API

Take Facebook pages management to the next level by handling messages directly within a CRM.

Personalized Responses

Tag and categorize interactions to tailor replies to each page audience.

Faster Responses

Sort and prioritize tagged messages to answer urgent inquiries first.

Improved Organization

Track every customer request so no message is overlooked or neglected.

Documentation
Posts API

Manage Facebook Posts, Comments & Reactions via API

Retrieve and publish posts from personal Facebook accounts and Pages, directly from your platform.

List & Retrieve Posts

Fetch posts from linked personal accounts and Pages, with captions, media and timestamps.

Create Posts

Publish a new post to a personal profile or a Facebook Page from your app.

Comment & React

Reply to comments and add reactions on posts, from the user's own account.

Documentation
Your App
FacebookFeed FacebookPosts Analytics
Posted via API
Clothing rack from a fall collection
248 32 14
248 reactions
Coveton Apparel Our fall collection just landed. Coats, knits and layers, available now in store and online. #fallcollection #newarrivals
Comments · 32
SRSofia Rivera
Sofia Rivera These look great, I need them!
24m 12
CA
Coveton Apparel Thanks Sofia! Sizes are restocked, the link is in the comments. via API
12m 3
DMDaniel Martinez
Daniel Martinez Do you ship to Europe?
8m 1
CA Reply as Coveton Apparel Post
Posts this week 3 published via API
+3
Attachments and media

Send Media Files in Messenger Conversations

Send text, images, audio, and video messages, as well as documents via the API.

Images and Videos

Share product photos or short videos directly inside a Messenger conversation.

Audio Messages

Send audio messages from your users' CRM or app, like any other reply.

Documents

Attach receipts, quotes or invoices to the conversation they belong to.

Documentation
Your App
FacebookChatMediaFiles
FacebookMessenger
Clothing rack from a fall collectionfall-collection.jpg
Customer holding shopping bagsfitting-video.mp4
2 images1 video1 audio1 document
Shared in this conversation
LMLucas Meyer
Lucas Meyer Here is a photo of the item I received.
item-photo.jpg
SBSarah Brown
Sarah Brown Thanks Lucas, here is your exchange label.
exchange-label.pdf
LMLucas Meyer
Lucas Meyer Perfect, I will drop it off tomorrow.
Audio message, 0:12
Attach a file and reply via Messenger Send
Users API

Sync Messenger Contacts into Your CRM

Retrieve user profiles, followers and friend requests with the Users API, and link their Messenger conversations to a CRM record.

Your App
FacebookMessenger conversations
Coveton Apparel page
Contacts 4
JCJulia Chen
Julia Chen Facebook3 conversations
LMLucas Meyer
Lucas Meyer Facebook2 conversations
DMDaniel Martinez
Daniel Martinez Facebook2 conversations
SRSofia Rivera
Sofia Rivera Facebook1 conversation
Sync
3 contacts synced
JCJulia Chen
Julia ChenCustomer · Coveton Apparel page
3Conversations
27Messages
318Followers
Full NameJulia Chen
Facebook PageCoveton Apparel, follower
Last MessageThank you for the quick answer!
Assigned ToCarlos Reed
TagsOrder, Support
ProfileGET /v2/{account_id}/users/{user_id}
Facebook API

Facebook and Messenger API Capabilities

Messaging, Posts and Users endpoints for personal Facebook accounts and Facebook Pages, through one unified API.

Explore All Endpoints

Account Connection

3 endpoints available

Hosted Auth: white label link to connect your end users
Custom Auth: connect with credentials or browser cookies
Two-factor checkpoints: SMS, authenticator app, WhatsApp, in-app validation or OTP

Messages

27 endpoints available

Send and Reply to Messages
List Chats, Page Inboxes and Messages
Start a Chat, from a Page Inbox too
Send and Download File Attachments
Edit, Delete and Forward Messages
Add and Remove Message Reactions
Read Status, Presence and Typing Indicator
Group Participants and Contacts

Posts

19 endpoints available

List and Retrieve Posts
Create, Update and Delete Posts
Post Reactions
Comments and Replies
Comment Reactions
User's Comments and Reactions

Users

14 endpoints available

Retrieve User Profiles and Pictures
User Presence
Update the Account Profile
Followers and Followings
Follow and Unfollow Users
Send, Accept or Cancel Friend Requests

Webhooks

9 events available

New Message
Message Edited or Deleted
Read and Delivery Receipts
New Reaction
Chat Updated or Deleted
Account Status
Use Cases

Facebook and Messenger API Use Cases

What you can build with the Facebook and Messenger API, and what your users gain.

Your CRM
ContactsDeals
ContactsCompanyViaStatus
JCJulia Chen
NexaTech
Facebook
Qualified
LMLucas Meyer
Synthex
Facebook
Proposal
SRSofia Rivera
Orbix
Facebook
Won
DMDaniel Martinez
Quark
Facebook
New

CRM and Sales

Sync Messenger conversations with contact records and reply directly from the CRM.

The full conversation history and every deal in one place, without leaving the CRM.

CRM Use Case
Your Helpdesk
TicketsCustomers
RequestsTicketViaStatus
MOMichel Opra
#4521
Facebook
Open
EGElena Garcia
#4498
Facebook
Solved
GLGabriel Lopez
#4530
Facebook
Pending
ARAnna Rossi
#4476
Facebook
Open

Customer Support and Helpdesk

Add Messenger to your support channels so agents read and answer Facebook messages in the same tool.

Facebook requests handled in the usual support tool, with no forgotten conversation.

Unified Inbox
Your AI Agent
ConversationsHandoffs
ContactsIntentViaStatus
VHVictor Harris
Pricing
Facebook
AI replied
NDNatalia Diaz
Demo
Facebook
Qualified
RFRobert Fox
Billing
Facebook
To a human
OWOscar Ward
Info
Facebook
AI replied

AI Agent Platforms

Connect AI agents to Messenger to answer questions, qualify requests and hand off to a human.

First replies automated, teams step in only when a request needs them.

AI Agent Use Case
Your Inbox
All channelsUnread
ContactsCompanyViaStatus
SBSarah Brown
NexaTech
Facebook
Replied
MYMery Yard
Orbix
WhatsApp
New
LMLucas Meyer
Synthex
Instagram
New
DMDaniel Martinez
Quark
LinkedIn
Replied

Multichannel Messaging

Bring Messenger, WhatsApp, Instagram, LinkedIn and email together in one interface with Unipile APIs.

Every channel read and answered from a single place.

Messaging API

Build Features into Your Product Today

Try our White-Label solution for free and unlock its full potential for your business. With the 7-Day Free Trial, gain access to the complete suite of features designed to enhance your platform's capabilities and branding.

How many accounts?
5.00 €
/account/month
How accounts are calculated Pricing is based on the number of linked accounts. For example, 3 Emails + 2 LinkedIn + 6 WhatsApp accounts would cost 55€ (11 x 5€) (or $60.5, 11 x $5.5). No additional cost by request. We have minimum of 49€/month ($55), including up to 10 accounts.

What's included

check
One API. All channels
Linkedin, Instagram, Email, WhatsApp...
check
All Features
Outreach, Real-time Inbox, Enrichment...
check
Unlimited usage
Only providers limit apply.
check
7-Day Free Trial
Build Now
Cancel anytime. No credit card required
Built for Developers

Connecting Made Easy: Integrate the Facebook and Messenger API in 2 API Requests

A production-ready SDK that handles the complexity of Facebook and Messenger integration. RESTful endpoints, real-time webhooks, and automatic rate limiting, so you can focus on building, not maintaining.

Simple Integration

Send messages, retrieve profiles and sync conversations with just a few lines of code. Our SDK handles authentication, rate limits, and error handling.

messenger-inbox.js
// Connect to Messenger in seconds
import { UnipileClient } from 'unipile-node-sdk';

const client = new UnipileClient({
  dsn: 'https://api.unipile.com',
  token: process.env.UNIPILE_TOKEN
});

// Retrieve a Messenger contact profile
const profile = await client.users.getProfile({
  account_id: accountId,
  provider_id: 'messenger_user_id'
});

// Reply to a Messenger conversation
await client.messaging.sendMessage({
  account_id: accountId,
  text: 'Hello! Thanks for your message.',
  attendees: [{ provider_id: 'messenger_user_id' }]
});
One Unified API

RESTful API

Clean, standardized endpoints with JSON responses. Predictable URL structure and HTTP methods.

Real-time Webhooks

Instant notifications for new messages and account status changes. No polling required.

Secure Authentication

Token-based authentication with automatic session management. Secure credential handling for all account types.

Account Protection

Built-in safeguards to protect Messenger accounts, with activity limits on every linked account.

Smart Rate Limiting

Automatic rate limit management with informative headers. We handle Messenger's restrictions for you.

Clear Error Handling

Descriptive error codes and messages. Built-in retry logic with exponential backoff.

Unified Dashboard

One dashboard for all your integrations

Manage all your LinkedIn, WhatsApp, Gmail accounts and more from a single, intuitive interface.

/
Acme
/
Application
Documentation
API Reference
Changelog
Connect a new account
Select the type of account you
want to connect
LinkedIn
LinkedIn
WhatsApp
WhatsApp
Facebook
Messenger
Telegram
Telegram
Google
Google
IMAP
IMAP
Microsoft
Microsoft
Google Calendar
Google Calendar
Outlook Calendar
Outlook Calendar

Accounts

20 Operational
0 Authentication required
0 Service interruption
0 Paused
Name ID Status Linked
Operational Linked on
03/01/2025
Operational Linked on
02/15/2025
Operational Linked on
02/10/2025
Operational Linked on
03/01/2025
Operational Linked on
02/28/2025
Operational Linked on
02/20/2025
Operational Linked on
03/01/2025
Operational Linked on
02/25/2025
Operational Linked on
03/01/2025
Operational Linked on
02/22/2025
Operational Linked on
02/14/2025
Operational Linked on
02/12/2025
Operational Linked on
02/08/2025
Operational Linked on
02/05/2025
Operational Linked on
03/01/2025
Operational Linked on
02/15/2025
Operational Linked on
03/01/2025
Operational Linked on
02/22/2025
Try for free
Dashboard Demo

Discover More from Our API Suite

Beyond Facebook and Messenger, Unipile connects your product to messaging platforms, email providers, and calendars.

WhatsAppLinkedInInstagramTelegram

Messaging API

Connect WhatsApp, LinkedIn, Instagram and Telegram to send, receive and manage conversations.

GmailOutlookIMAP

Email API

Integrate Gmail, Outlook and IMAP to send, receive and sync emails in real time.

Google CalendarOutlook Calendar

Calendar API

Sync Google Calendar and Outlook events in real time, directly from your product.

6000+ Companies Innovating with Unipile
Trusted by industry leaders
1 API
Streamline operations for all major communication channels
2 Days
Achieve live integration quickly with minimal setup
30%
Reduction in maintenance efforts and resources

Built-In Security and Compliance

Enterprise-grade protection for your data and workflows Learn more about our security
SOC 2 Type II
SOC 2 Type II
Certified
Independently audited security controls ensuring data protection and operational integrity.
GDPR
GDPR
Compliant
Full compliance with European data protection regulations for user privacy.
99.9%
Platform Uptime over the last 24 months
24/7
Global Support with high-performance API
European Commission
EU Regulated Digital Markets Act (DMA)

Each user connects their own account, with no profile storage. Unipile is not a Meta Partner. Learn more

Facebook and Messenger API FAQ

Everything you need to know about integrating Messenger with Unipile's API

It is an application programming interface that connects Facebook to your applications, websites and CRM systems: Messenger conversations on one side, posts, comments, reactions and user profiles on the other. Unipile covers Messaging, Posts and Users, for personal Facebook accounts and Facebook Pages.

Yes. Our API is designed in line with the Digital Markets Act (DMA). Each user connects their own Facebook account or Pages, and Unipile acts on their behalf without storing user profiles. Please note that Unipile is not a Meta Partner.

Absolutely. Clients must always respect Meta's TOS. This means acting responsibly, avoiding spam or unauthorized automation, and using the API strictly for legitimate messaging scenarios such as customer support, notifications, or direct user interactions.

You can integrate the Facebook Messenger API by following the SDK. It provides detailed instructions on setting up the integration.

Use cases include customer support, order tracking, appointment scheduling, and personalized marketing campaigns, among others.

Yes, you can send text, images, audio, and video messages, as well as documents via the API.

Absolutely. The API is designed to be flexible and can be integrated into your existing CRM or other business software.

It's important to note that adherence to the terms of use of the providers is essential. Violations can result in the suspension or banning of your account. We recommend implementing usage limitations on your end to prevent the sending of an excessive number of messages by your users.

Still have questions? Our team is here to help.

Talk to an expert