Skip to main content

zlapi: Zalo API for Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zlapi-1.0.1.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

zlapi-1.0.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file zlapi-1.0.1.tar.gz.

File metadata

  • Download URL: zlapi-1.0.1.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for zlapi-1.0.1.tar.gz
Algorithm Hash digest
SHA256 79b95b4667be80208c2f1801cd4014c56c15ad96832e7ac3f29984b4950af039
MD5 db7a5c3881a3de219609e8820d1306ad
BLAKE2b-256 3f9d2d25230fdeb647a9526bdf35c7258a5d1ab287b7c606aff0ba3e3d8507b4

See more details on using hashes here.

File details

Details for the file zlapi-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: zlapi-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for zlapi-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b6494786c0f9b24103cb4ed31e9abfd0497d4146e061839980cc9f70e2e429c
MD5 5be7475c85cb0110aac22b5648972ea9
BLAKE2b-256 f45b87cd2c9e0d571dcc048b7eabb855ab00f4db0433cab370931b575fe54497

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page