Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channels.getParticipants возвращает InvalidArgumentException #171

Open
jiexaspb opened this issue Nov 6, 2024 · 1 comment
Open

Comments

@jiexaspb
Copy link

jiexaspb commented Nov 6, 2024

Добрый вечер

Делаю запрос
http://127.0.0.1:9503/api/channels.getParticipants/?channel=-1002276911501&filter[_]=channelParticipantsRecent

Все строго по доке https://docs.madelineproto.xyz/API_docs/methods/channels.getParticipants.html

Возвращает ошибку

{
    "success": false,
    "errors": [
        {
            "exception": "InvalidArgumentException",
            "message": "Parameter names must be provided!",
            "file": "/app-host-link/vendor/danog/madelineproto/src/Namespace/AbstractAPI.php",
            "line": 60,
            "code": 0,
            "backtrace": [
                {
                    "file": "/app-host-link/src/Controllers/AbstractApiController.php",
                    "line": 176,
                    "function": "__call",
                    "class": "danog\\MadelineProto\\Namespace\\AbstractAPI",
                    "type": "->",
                    "args": [
                        "getParticipants",
                        [
                            {
                                "_": "channelParticipantsRecent"
                            }
                        ]
                    ]
                },

Что не так в этом?

@xtrime-ru
Copy link
Owner

Нужно правильно сформировать массив в запросе: https://github.com/xtrime-ru/TelegramApiServer?tab=readme-ov-file#usage

В данном случае урл должен быть такой:

http://127.0.0.1:9503/api/channels.getParticipants/?data[channel]=-1002276911501&data[filter][_]=channelParticipantsRecent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants