### Install and Run Pyrogram Basic Example Source: https://docs.kurigram.live/intro/quickstart This Python code snippet demonstrates how to install Pyrogram, set up API credentials, and send a basic message to yourself on Telegram. It requires Python 3 and the Pyrogram library. The script sends a predefined message to the 'me' chat. ```python import asyncio from pyrogram import Client api_id = 12345 api_hash = "0123456789abcdef0123456789abcdef" async def main(): async with Client("my_account", api_id, api_hash) as app: await app.send_message("me", "Greetings from **Pyrogram**!") asyncio.run(main()) ``` -------------------------------- ### Run Pyrogram Client Example Source: https://docs.kurigram.live/api/methods/run This Python code demonstrates how to initialize and run a Pyrogram client. It shows the basic setup of creating a client instance and calling the `run()` method. This is a simple way to start a single client without needing to explicitly call start, idle, and stop. ```python from pyrogram import Client app = Client("my_account") ... # Set handlers up app.run() ``` -------------------------------- ### Start Telegram Client with Authorization - Python Source: https://docs.kurigram.live/api/methods/start Demonstrates how to start a Pyrogram client, connect to Telegram, and perform API operations. It utilizes asyncio for asynchronous execution and requires the 'qrcode' package for QR code authorization if enabled. The example includes starting, performing actions, and stopping the client. ```python import asyncio from pyrogram import Client async def main(): app = Client("my_account") await app.start() ... # Invoke API methods await app.stop() asyncio.run(main()) ``` -------------------------------- ### Basic Pyrogram Client Setup in Python Source: https://docs.kurigram.live/index This snippet demonstrates how to set up a basic Pyrogram client in Python. It initializes a client instance, defines an asynchronous handler function to reply to private messages, and runs the event loop. Ensure you have the Pyrogram library installed. ```python import asyncio from pyrogram import Client, filters from pyrogram.handlers import MessageHandler async def hello(client, message): await message.reply("Hello from Pyrogram!") async def main(): # You should ALWAYS create client instance inside async function # or you might run into problems. app = Client("my_account") app.add_handler(MessageHandler(hello, filters.private)) loop = asyncio.get_event_loop() loop.run_until_complete(main()) ``` -------------------------------- ### Verify Kurigram Installation (Python) Source: https://docs.kurigram.live/intro/install Verifies that the Kurigram library has been successfully installed by importing it into a Python interactive shell. If the import is successful and the version can be accessed without errors, the installation is confirmed. ```python >>> import pyrogram >>> pyrogram.__version__ 'x.y.z' ``` -------------------------------- ### account.InstallWallPaper Source: https://docs.kurigram.live/telegram/functions/account/install-wall-paper Installs a wallpaper with the provided settings. ```APIDOC ## POST /account/InstallWallPaper ### Description Installs a wallpaper with the provided settings. ### Method POST ### Endpoint /account/InstallWallPaper ### Parameters #### Request Body - **wallpaper** (InputWallPaper) - Required - Wallpaper to install - **settings** (WallPaperSettings) - Required - Wallpaper settings ### Request Example ```json { "wallpaper": {"api_id": "string", "pattern": "string"}, "settings": {"layout": {"width": 0, "height": 0}, "blur": 0, "motion_contrast": true, "zoom": true} } ``` ### Response #### Success Response (200) - **result** (bool) - True if the wallpaper was installed successfully, false otherwise. ``` -------------------------------- ### account.WallPapers - Installed wallpapers Source: https://docs.kurigram.live/telegram/base/account/wall-papers Represents a list of installed wallpapers. ```APIDOC ## account.WallPapers ### Description Represents a list of installed wallpapers. ### Method GET ### Endpoint /account/WallPapers ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **data** (list) - A list of wallpaper objects. #### Response Example { "data": [ { "id": 123, "name": "Default Wallpaper", "image": "http://example.com/wallpaper.jpg" } ] } ``` -------------------------------- ### Install Kurigram Stable Version (Python) Source: https://docs.kurigram.live/intro/install Installs the latest stable version of the Kurigram framework using pip3. This is the recommended method for most users. It ensures you have a tested and reliable version of the library. ```bash pip3 install -U kurigram ``` -------------------------------- ### account.InstallTheme Source: https://docs.kurigram.live/telegram/functions/account/install-theme Installs a theme for the user account. It supports installing dark versions, specifying theme details, format, and base theme. ```APIDOC ## POST /account/InstallTheme ### Description Installs a theme for the user account. This function allows for specifying whether to install the dark version of the theme, providing the theme details, format, and base theme. ### Method POST ### Endpoint /account/InstallTheme ### Parameters #### Query Parameters - **dark** (bool) - Optional - Whether to install the dark version of the theme. - **theme** (InputTheme) - Optional - The theme object to install. - **format** (str) - Optional - The format of the theme, identifying supported theming engines. - **base_theme** (BaseTheme) - Optional - Indicates a basic theme provided by all clients. ### Request Body (No request body specified for this endpoint, parameters are passed as query parameters) ### Request Example ```json { "dark": true, "theme": { "__type": "InputTheme", "id": "some_theme_id" }, "format": "some_format", "base_theme": { "__type": "BaseTheme", "name": "some_base_theme" } } ``` ### Response #### Success Response (200) - **result** (bool) - Returns `true` if the theme was installed successfully, `false` otherwise. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### GET /account/GetThemes Source: https://docs.kurigram.live/telegram/base/account/themes Retrieves a list of installed themes for the user. ```APIDOC ## GET /account/GetThemes ### Description Retrieves a list of installed themes for the user. ### Method GET ### Endpoint `/account/getThemes` ### Parameters #### Query Parameters - **hash** (string) - Optional - A hash value to check if the themes have been modified. ### Request Example ```http GET /account/getThemes?hash=some_hash_value ``` ### Response #### Success Response (200) - **themes** (account.Themes | account.ThemesNotModified) - The installed themes or an indication that they haven't changed. #### Response Example ```json { "@type": "account.themes", "themes": [ { "@type": "theme", "document_id": 1234567890 } ], "document_id": 9876543210 } ``` ``` -------------------------------- ### account.Themes Source: https://docs.kurigram.live/telegram/base/account/themes Represents a list of installed themes. ```APIDOC ## account.Themes ### Description Represents a list of installed themes. ### Method N/A (This is a type definition) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **themes** (array) - A list of theme objects. - **document_id** (long) - The document ID associated with the themes. #### Response Example ```json { "@type": "account.themes", "themes": [ { "@type": "theme", "document_id": 1234567890 } ], "document_id": 9876543210 } ``` ``` -------------------------------- ### Install Kurigram Development Version (Python) Source: https://docs.kurigram.live/intro/install Installs the bleeding-edge development version of Kurigram from the 'dev' branch of its GitHub repository. This requires pip3 and potentially an updated Python installation. It installs the package directly from a ZIP archive. ```bash pip3 install -U https://github.com/KurimuzonAkuma/pyrogram/archive/dev.zip ``` -------------------------------- ### Install QR Code Package - Shell Source: https://docs.kurigram.live/start/auth Installs the 'qrcode' Python package required for QR code login functionality in Pyrogram. This command should be run in your terminal. ```shell $ pip3 install qrcode ``` -------------------------------- ### Pyrogram MessageHandler Example Source: https://docs.kurigram.live/api/handlers Demonstrates how to set up a MessageHandler in Pyrogram to process incoming messages. This example initializes a Pyrogram client, defines a callback function 'dump' to print messages, and then adds the handler to the client before running it. It requires the 'pyrogram' library. ```python from pyrogram import Client from pyrogram.handlers import MessageHandler app = Client("my_account") def dump(client, message): print(message) app.add_handler(MessageHandler(dump)) app.run() ``` -------------------------------- ### Install uvloop using pip Source: https://docs.kurigram.live/topics/speedups This command installs uvloop, a fast, drop-in replacement for Python's built-in asyncio event loop, implemented in Cython for significant performance gains. ```bash pip3 install -U uvloop ``` -------------------------------- ### Handle Raw Updates with Pyrogram Source: https://docs.kurigram.live/start/examples/raw_updates This Python code snippet demonstrates how to set up a Pyrogram client to listen for and process raw updates. It utilizes the `@app.on_raw_update()` decorator to define an asynchronous handler function that prints the received update data. Ensure you have Pyrogram installed (`pip install pyrogram`). ```python from pyrogram import Client app = Client("my_account") @app.on_raw_update() async def raw(client, update, users, chats): print(update) app.run() # Automatically start() and idle() ``` -------------------------------- ### GET /messages/GetAllStickers Source: https://docs.kurigram.live/telegram/base/messages/all-stickers Retrieves information about all installed stickers. ```APIDOC ## GET /messages/GetAllStickers ### Description Retrieves information about all installed stickers. ### Method GET ### Endpoint /messages/GetAllStickers ### Parameters ### Request Example (No request body for this GET request) ### Response #### Success Response (200) - **result** (Type: messages.AllStickers) - Information about all installed stickers. #### Response Example ```json { "result": { "__type": "messages.AllStickers", "hashes": [ "sticker_hash_1", "sticker_hash_2" ], "stickers": [ { "id": 123, "access_hash": "access_hash_1", "file_reference": "file_reference_1", "flags": 0, "type": "regular" } ], "install_peer_id": "install_peer_id_1" } } ``` ``` -------------------------------- ### POST /messages/InstallStickerSet Source: https://docs.kurigram.live/telegram/functions/messages/install-sticker-set Installs a sticker set for the user. You can choose to archive the sticker set after installation. ```APIDOC ## POST /messages/InstallStickerSet ### Description Installs a sticker set for the user. This function allows for the installation of a specified sticker set and provides an option to archive it. ### Method POST ### Endpoint /messages/InstallStickerSet ### Parameters #### Query Parameters - **stickerset** (InputStickerSet) - Required - The sticker set to install. - **archived** (bool) - Optional - Whether to archive the sticker set after installation. ### Request Example ```json { "stickerset": { "id": "12345", "access_hash": "some_access_hash" }, "archived": false } ``` ### Response #### Success Response (200) - **result** (messages.StickerSetInstallResult) - The result of the sticker set installation. #### Response Example ```json { "result": { "sticker_set": { "id": "12345", "access_hash": "some_access_hash", "title": "Example Stickers", "short_name": "example", "thumbnail": null, "thumbnail_transparent": null, "thumbnail_cloudy": null, "stickers": [], "premium_stickers": [], "is_animated": false, "is_masks": false, "is_premium": false, "stickers_count": 0, "hash": "" }, "sets_promo": [] } } ``` ``` -------------------------------- ### Use uvloop before creating Pyrogram Client Source: https://docs.kurigram.live/topics/speedups This Python code shows an alternative way to use uvloop with Pyrogram by installing it before creating the Client instance. It sets up a message handler and runs the client, ensuring uvloop is active from the start. ```python import uvloop from pyrogram import Client uvloop.install() app = Client("my_account") @app.on_message() async def hello(client, message): print(await client.get_me()) app.run() ``` -------------------------------- ### messages.InstallStickerSet Source: https://docs.kurigram.live/telegram/base/messages/sticker-set-install-result Function to install a sticker set. ```APIDOC ## POST /messages.InstallStickerSet ### Description Installs a sticker set. This function can return a `messages.StickerSetInstallResult` which can be either `messages.StickerSetInstallResultSuccess` or `messages.StickerSetInstallResultArchive`. ### Method POST ### Endpoint /messages.InstallStickerSet ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **sticker_set** (InputStickerSet) - Required - The sticker set to install. ### Request Example ```json { "sticker_set": { "_type": "InputStickerSetID", "id": 12345, "access_hash": "example_access_hash" } } ``` ### Response #### Success Response (200) - **result** (messages.StickerSetInstallResult) - The result of the sticker set installation process. #### Response Example ```json { "_type": "messages.StickerSetInstallResultSuccess" } ``` ``` -------------------------------- ### Restart Kurigram Client using Python Source: https://docs.kurigram.live/api/methods/restart Demonstrates how to restart a Kurigram client instance using Python. This example shows the typical usage within an asyncio event loop, including starting, performing operations, restarting, and finally stopping the client. ```python import asyncio from pyrogram import Client async def main(): app = Client("my_account") await app.start() ... # Invoke API methods await app.restart() ... # Invoke other API methods await app.stop() asyncio.run(main()) ``` -------------------------------- ### Connect to Pyrogram Test Servers Source: https://docs.kurigram.live/topics/test-servers This Python code snippet demonstrates how to initiate a new Pyrogram session connected to Telegram's test servers. It utilizes the `Client` class with the `test_mode=True` argument and prints the user's information obtained from the test environment. Ensure Pyrogram is installed (`pip install pyrogram`). ```python from pyrogram import Client async with Client("my_account_test", test_mode=True) as app: print(await app.get_me()) ``` -------------------------------- ### Install TgCrypto using pip Source: https://docs.kurigram.live/topics/speedups This command installs the TgCrypto library, a high-performance C extension for Pyrogram, which accelerates cryptographic operations required by Telegram. ```bash pip3 install -U tgcrypto ``` -------------------------------- ### account.Themes Source: https://docs.kurigram.live/telegram/types/account/themes Represents the installed themes for an account. ```APIDOC ## account.Themes ### Description Represents the installed themes for an account. ### Constructor `account.Themes(hash: int, themes: List[Theme])` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "hash": "64-bit integer", "themes": [ { "id": "theme_id", "name": "theme_name", "is_dark": true/false } ] } ``` ### Response #### Success Response (200) - **hash** (int) - Hash used for caching. - **themes** (List[Theme]) - A list of installed themes. #### Response Example ```json { "hash": 1234567890, "themes": [ { "id": "dark_theme", "name": "Dark Mode", "is_dark": true }, { "id": "light_theme", "name": "Light Mode", "is_dark": false } ] } ``` ``` -------------------------------- ### Client.run() Source: https://docs.kurigram.live/api/methods/run Starts the client, idles the main script, and then stops the client. This method is a convenience wrapper for start(), idle(), and stop(). ```APIDOC ## Client.run() ### Description Starts the client, idles the main script, and then stops the client. When called without arguments, it acts as a convenience method that calls `start()`, `idle()`, and `stop()` in sequence. This is useful for running a single client with less verbosity. For running multiple clients simultaneously, consider using `pyrogram.compose()`. ### Method `run()` ### Endpoint N/A (This is a client method, not a REST endpoint) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python from pyrogram import Client app = Client("my_account") # Set handlers up app.run() ``` ### Response #### Success Response (200) N/A (This method does not return a response body, but rather controls the client's lifecycle.) #### Response Example N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters #### Path Parameters N/A ``` -------------------------------- ### help.InviteText Source: https://docs.kurigram.live/telegram/types/help/invite-text Represents the text of a message containing an invitation to install Telegram. ```APIDOC ## help.InviteText ### Description Text of a text message with an invitation to install Telegram. ### Method N/A (This is a type definition) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (N/A) This is a type definition, not a direct API call response. #### Response Example ```json { "message": "string" } ``` ### Details - **Layer**: `214` - **ID**: `18CB9F78` - **Constructor Parameters**: `message` (str) ``` -------------------------------- ### GET /messages/GetEmojiStickers Source: https://docs.kurigram.live/telegram/base/messages/all-stickers Gets the list of currently installed custom emoji stickersets. ```APIDOC ## GET /messages/GetEmojiStickers ### Description Gets the list of currently installed custom emoji stickersets. ### Method GET ### Endpoint /messages/GetEmojiStickers ### Parameters ### Request Example (No request body for this GET request) ### Response #### Success Response (200) - **result** (Type: messages.AllStickers) - Information about installed custom emoji stickersets. #### Response Example ```json { "result": { "__type": "messages.AllStickers", "hashes": [ "emoji_sticker_hash_1" ], "stickers": [ { "id": 789, "access_hash": "emoji_access_hash_1", "file_reference": "emoji_file_reference_1", "flags": 0, "type": "emoji" } ], "install_peer_id": "emoji_install_peer_id_1" } } ``` ``` -------------------------------- ### help.PromoData Constructor Source: https://docs.kurigram.live/telegram/types/help/promo-data Represents a set of useful suggestions and a PSA/MTProxy sponsored peer. ```APIDOC ## help.PromoData Constructor ### Description A set of useful suggestions and a PSA/MTProxy sponsored peer. ### Method (Constructor) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **expires** (int 32-bit) - Unixtime when to re-invoke help.getPromoData. - **pending_suggestions** (List of str) - Contains a list of pending suggestions. - **dismissed_suggestions** (List of str) - Contains a list of inverted suggestions. - **chats** (List of Chat) - Chat info. - **users** (List of User) - User info. - **proxy** (bool, optional) - Set when connecting using an MTProxy that has configured an associated peer (that will be passed in `peer`, i.e. the channel that sponsored the MTProxy) that should be pinned on top of the chat list. - **peer** (Peer, optional) - MTProxy/PSA peer. - **psa_type** (str, optional) - For Public Service Announcement `peer`s, indicates the type of the PSA. - **psa_message** (str, optional) - For Public Service Announcement `peer`s, contains the PSA itself. - **custom_pending_suggestion** (PendingSuggestion, optional) - Contains a list of custom pending suggestions. #### Response Example ```json { "expires": 1678886400, "pending_suggestions": ["suggestion1", "suggestion2"], "dismissed_suggestions": ["dismissed1"], "chats": [], "users": [], "proxy": true, "peer": null, "psa_type": null, "psa_message": null, "custom_pending_suggestion": null } ``` ``` -------------------------------- ### messages.StickerSetInstallResult Source: https://docs.kurigram.live/telegram/base/messages/sticker-set-install-result The base type for sticker set installation results. ```APIDOC ## messages.StickerSetInstallResult ### Description Represents the result of a sticker set installation process. This is a base type with different constructors indicating success or archiving. ### Method N/A (This is a type definition, not an endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Send Message with Pyrogram Client Source: https://docs.kurigram.live/start/examples/hello_world This Python script demonstrates how to use the Pyrogram library to send a message. It requires the 'pyrogram' package and 'asyncio'. The script creates a 'Client' instance, sends a message to the 'me' user, and utilizes Markdown for formatting. ```python import asyncio from pyrogram import Client async def main(): # Create a new Client instance app = Client("my_account") async with app: # Send a message, Markdown is enabled by default await app.send_message("me", "Hi there! I'm using **Pyrogram**") asyncio.run(main()) ``` -------------------------------- ### help.ConfigSimple Constructor Source: https://docs.kurigram.live/telegram/types/help/config-simple Details of the help.ConfigSimple type constructor, including its layer, ID, and parameters. ```APIDOC ## help.ConfigSimple ### Description Represents a Telegram API type, specifically the `ConfigSimple` constructor. ### Method CONSTRUCTOR ### Endpoint N/A (Internal type constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "Not applicable for constructor" } ``` ### Response #### Success Response (200) - **date** (int 32-bit) - N/A - **expires** (int 32-bit) - N/A - **rules** (List of AccessPointRule) - N/A #### Response Example ```json { "date": 1678886400, "expires": 3600, "rules": [ { "type": "AccessPointRule", "domain": "example.com", "ips": ["192.168.1.1"] } ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.