Introduction

    This API retrieves participants of a group.

    Endpoint

    Method: POST
    URL: /collect-audience
    Description: Pass a list of chat or channel IDs to get users.

    Request Body for url: /participants

    • folder (String, required): The folder containing the accounts to be used for data.
    • phones (List, required): The list of phones to be checked that were returned from the /joined-groups-users endpoint.
    • chats_ids (List, required): These IDs or username will help to get participants from groups.
    • all_participants (Bool, optional): Collect all participants if there are permissions to collect users.
    • admin (Bool, optional): Collect admins if there are permissions to collect.
    • bots (Bool, optional): Collect only bots if there are permissions to collect.
    • stopped_in_month (Bool, optional): Collect only users who stopped this month if there are permissions to collect.
    • stopped_in_week (Bool, optional): Collect only users who stopped this week if there are permissions to collect.
    • was_recently (Bool, optional): Collect only users who were recently active if there are permissions to collect.
    • long_visited (Bool, optional): Collect only users who visited for a long time if there are permissions to collect.
    • is_online (Bool, optional): Collect only online users if there are permissions to collect.
    • left_emojis_users (Bool, optional): Collect only users who left emojis if there are permissions to collect.

    Example Request (1) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "all_participants": true/false,
    }
    

    Example Request (2) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "admin": true/false,
    }
    

    Example Request (3) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "bots": true/false,
    }
    

    Example Request (4) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "stopped_in_month": true/false,
    }
    

    Example Request (5) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "stopped_in_week": true/false,
    }
    

    Example Request (6) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "was_recently": true/false,
    }
    

    Example Request (7) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "is_online": true/false,
    }
    

    Example Request (8) Body for url: /collect-audiance

    {
        "folder": "active",
        "phones": ["84523786659"],
        "chats_ids": [1109500936],
        "left_emojis_users": true/false,
    }
    

    Example Response for /collect-audiance

    • Stream Text
    [
        {"name": "Silvia", "username": "TelethonianBot"},
        {"name": "Vitalik 🪶", "username": "pirog_y"},
        {"name": "Aryan BadBoy Controlled By Fire And Adarsh", "username": "Aryan_BadBoy"}
    ]