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

Is it possible to do it only with query_id? #26

Closed
JyuVioleGraceBAM opened this issue Oct 7, 2024 · 0 comments
Closed

Is it possible to do it only with query_id? #26

JyuVioleGraceBAM opened this issue Oct 7, 2024 · 0 comments

Comments

@JyuVioleGraceBAM
Copy link

JyuVioleGraceBAM commented Oct 7, 2024

I tried modifying the code to work using only query_id, but I'm getting a 403 Forbidden error.

Does anyone have any suggestions or ideas on how to make it work without needing the API ID and API hash? I managed to remove the requirement to use the API ID and hash ID in the code, but when the request is made using the query_id that I obtained with Kiwi + Telegram Mini Auth Extractor in GRAPHQL_URL, it returns a 403 error. Does anyone have any ideas on how to bypass this? I am building the json_data like this:

        json_data = {
            "operationName": "MutationTelegramUserLogin",
            "variables": {
                "webAppData": {
                    "auth_date": auth_date,
                    "hash": hash_,
                    "query_id": query_id,
                    "checkDataString": f"auth_date={auth_date}\nquery_id={query_id}\nuser={unquote(params['user'])}",
                    "user": {
                        "id": user_data["id"],
                        "allows_write_to_pm": user_data.get("allows_write_to_pm", False),
                        "first_name": user_data["first_name"],
                        "last_name": user_data["last_name"],
                        "username": user_data.get("username", "Please set username"),
                        "language_code": user_data["language_code"],
                        "is_premium": user_data.get("is_premium", False)
                    }
                }
            },
           "query": "mutation MutationTelegramUserLogin($webAppData: TelegramWebAppDataInput!) {\n  telegramUserLogin(webAppData: $webAppData) {\n    access_token\n    __typename\n  }\n}"
        }
@sirbiprod sirbiprod closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
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