GithubHelp home page GithubHelp logo

kcducky / kik-bot-api-unofficial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomer8007/kik-bot-api-unofficial

0.0 0.0 0.0 618 KB

Python API for writing unoffical kik bots that act like humans

License: MIT License

Python 99.60% Shell 0.40%

kik-bot-api-unofficial's Introduction

Kik Bot API

Use this library to develop bots for Kik Messenger that are essentially automated humans.

It basically lets you do the same things as the offical Kik app by pretending to be a real smartphone client: It communicates with Kik's servers at talk1110an.kik.com:5223 over a modified version of the XMPP protocol.

This is the new branch of this project and is recommended.

Installation and dependencies

First, make sure you are using Python 3.6+, not python 2.7. Second, just install it directly from GitHub:

git clone -b new https://github.com/tomer8007/kik-bot-api-unofficial
pip3 install ./kik-bot-api-unofficial

Usage

Examples are a great way to understand things. A good place to start is the examples/ directory.

It is as simple as:

from kik_unofficial.client import KikClient
from kik_unofficial.callbacks import KikClientCallback
import kik_unofficial.datatypes.xmpp.chatting as chatting

class EchoBot(KikClientCallback):
    def __init__(self):
        self.client = KikClient(self, "your_kik_username", "your_kik_password")

    def on_authenticated(self):
        self.client.request_roster() # request list of chat partners

    def on_chat_message_received(self, chat_message: chatting.IncomingChatMessage):
        self.client.send_chat_message(chat_message.from_jid, 'You said "{}"!'.format(chat_message.body))

Currently Supported Operations:

  • Log in with kik username and password, retrieve user information (such as email, name, etc).
  • Fetch chat partners information
  • Send text messages to users/groups and listen for incoming messages
  • Send and receive 'is-typing' status
  • Send and receive read receipts
  • Fetch group information (name, participants, etc.)
  • Admin groups (add, remove or ban members, etc)
  • Search for groups and join them [Experimental]
  • Receive media content: camera, gallery, stickers
  • Add a kik user as a friend
  • Send images (including GIFs, using a tendor.com API key)

Sending videos or recordings is not supported yet.

More functionality

Before investigating the format of certain requests/responses, it's worth checking if they are already documented in the Message Formats wiki page.

Troubleshooting

If you are on Windows and you are unable to install the lxml package, use the binary installers from PyPi here.

If you are using Termux, then use pkg install libxml2 libxslt to install lxml and pkg install zlib libpng libjpeg-turbo to install pillow dependencies.

kik-bot-api-unofficial's People

Contributors

tomer8007 avatar jaapp- avatar wolfieanmol avatar sprt avatar 3dik avatar kandnub avatar cheshirecaat avatar hunterbeach avatar yassienw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.