Its-VrxxDev / zlapi

Zalo API for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zlapi - Zalo API (Website) for Python

Project version Supported python versions: >= 3. and pypy License: MIT License Documentation

A powerful and efficient library to interact with Zalo Website. This is not an official API, Zalo has that over here for chat bots. This library differs by using a normal Zalo account instead (More flexible).

zlapi currently support:

  • Custom style for message.
  • Sending many types of messages, with files, stickers, mentions, etc.
  • Fetching messages, threads and users info.
  • Creating groups, setting the group, creating polls, etc.
  • Listening for, an reacting to messages and other events in real-time.
  • And there are many other things.
  • async/await (Coming Soon).

Essentially, everything you need to make an amazing Zalo Bot!

Caveats

zlapi works by imitating what the browser does, and thereby tricking Zalo into thinking it's accessing the website normally.

However, there's a catch! Using this library may not comply with Zalo's Terms Of Service!, so be We are not responsible if your account gets banned or disabled!

With that out of the way, you may go to Docs to see the full documentation!

Installation

pip install zlapi

If you don't have pip, this guide can guide you through the process.

You can also install directly from source, provided you have pip>=19.0:

pip install git+https://github.com/Its-VrxxDev/zlapi.git

Example Usage

from zlapi import ZaloAPI
from zlapi.models import *

imei = "<imei>"
cookies = "<cookies>"
client = ZaloAPI("<phone>", "<password>", imei=imei, session_cookies=cookies)
client.send(Message(text="Hi Myself!"), thread_id=client.uid, thread_type=ThreadType.USER)

More examples are available here.

This project is a relocation

This project is a project to be relocated from zaloapi because this module has been removed from Pypi and the reason is unknown.

Contact

Acknowledgments

This project was originally inspired by fbchat.

About

Zalo API for Python

License:MIT License


Languages

Language:Python 100.0%