Skip to main content

fbchat-muqit Facebook & Messenger API

PyPI - Python Version PyPI - Version License: GPLv3

fbchat-muqit An Unofficial Asynchronous Facebook Messenger API designed to interact with Facebook and Messenger. As It is an Unofficial API we are not responsible if you get banned by Facebook. We recommend to use a dummy Facebook account. For more details check the Documentation.

[!Note] Bumped from version 1.1.31 to 1.2.0 and version 1.2.0 is a rewrite version meaning the library has been fully rewritten and Major changes has been made. The API is now fully Documented and the usage examples are updated.

[!WARNING] Due to end-to-end encryption sending messages to other Users is not supported anymore. You can send messages to Group Chat, Room Chat and to pages. See more You may still be able to send messages to another User if the that User account is inactive for many years because end-to-end encryption is not applied when sending message to those account unless the account is Opened again.

🛠️ Installation

You can install fbchat-muqit using pip:

pip install fbchat-muqit

For the latest development version:

pip install git+https://github.com/togashigreat/fbchat-muqit.git

📙 Documentation

The API is Documented. Read The Documentation. The older version 1.1.31 Documentation is available as well.

🔧 Prerequisites

  • Python 3.9+
  • A Facebook account (It's safer to use old unused account)
  • Facebook account cookies 🍪

📖 Usage Example

To login in Facebook you will need Facebook account cookies. Since login via email and password is no longer supported.

To get your Facebook account cookies. First login in your Facebook account and then add C3C Chrome extension in your browser. Open a your Facebook account in a browser tab and use this extension to get your account cookies. Copy the cookies and save them in a json file. We will use the cookies to interact with Facebook server. We will call this account Client account.

A basic example of How to use it.

from fbchat_muqit import Client, Message, EventType

client = Client(cookies_file_path="cookies.json")

@client.event
async def on_message(message: Message):
    # To avoid spam check if sender_id is client's id or not
    if message.sender_id != client.uid:
        # echo the message
        await client.send_message(message.text, message.thread_id)

client.run()

Save the code in file test.py and now run the code.

python3 test.py

If It logins succesfully then Use another Facebook account to create a messenger group and add both of the accounts to the group. Now, send message to the group and fbchat_muqit Client account will listen to all incoming messages and events. If everything works properly It should reply and react to the message sent by your other account with an emoji.

📄 License

This project is distributed under a dual-license model:

  • BSD-3-Clause License: Parts of the code are reused and adapted from the original fbchat library, licensed under the BSD-3-Clause License. See LICENSE-BSD for details.

  • GPL v3 License: New contributions and modifications by Muhammad MuQiT/togashigreat are licensed under the GPL v3.0 License. See LICENSE for details.

✉️Contact Me

Release files for fbchat-muqit 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fbchat-muqit 1.2.2
File Size Uploaded
fbchat_muqit-1.2.2.tar.gz 220.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fbchat-muqit 1.2.2
File Interpreter ABI Platform
fbchat_muqit-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 335.0 kB

Release files / fbchat_muqit-1.2.2.tar.gz

Download URL fbchat_muqit-1.2.2.tar.gz
Size 220.3 kB
Tags Source
SHA-256 checksum
How to use checksums
79d21ae6cc21a5db58ed5578396c7e72787f8d789a16362de5a10965cb2b5670
BLAKE2b-256 checksum
How to use checksums
07b744127598b50fa63fc4cb9a11dd891c57927dde84350b2464fc93e1b19e5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 30, 2026.

Transparency log

Release files / fbchat_muqit-1.2.2-py3-none-any.whl

Download URL fbchat_muqit-1.2.2-py3-none-any.whl
Size 114.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e604aad605cd6e98223ca6a03023819a0750cc11477af5f3b444cb6dab1909c
BLAKE2b-256 checksum
How to use checksums
5a1958f2587b7eaaeda9cb168a86a988dffb2609d98a68f248ba4a1f57904b94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.31

2 release files

1.1.5

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page