Source code for pyrogram.raw.functions.messages.check_url_auth_match_code

#  Pyrogram - Telegram MTProto API Client Library for Python
#  Copyright (C) 2017-present Dan <https://github.com/delivrance>
#
#  This file is part of Pyrogram.
#
#  Pyrogram is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License as published
#  by the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Pyrogram is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public License
#  along with Pyrogram.  If not, see <http://www.gnu.org/licenses/>.

from io import BytesIO

from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
from pyrogram.raw.core import TLObject
from pyrogram import raw
from typing import List, Optional, Any

# # # # # # # # # # # # # # # # # # # # # # # #
#               !!! WARNING !!!               #
#          This is a generated file!          #
# All changes made in this file will be lost! #
# # # # # # # # # # # # # # # # # # # # # # # #


[docs] class CheckUrlAuthMatchCode(TLObject): # type: ignore """Validate the match code selected by the user against the code shown on the login page, as part of the `OAuth authorization flow ยป <https://core.telegram.org/api/url-authorization#oauth-authorization>`_. .. include:: /_includes/usable-by/users.rst Details: - Layer: ``229`` - ID: ``C9A47B0B`` Parameters: url (``str``): The OAuth deep link match_code (``str``): The emoji or code selected by the user from the list in `urlAuthResultRequest <https://core.telegram.org/constructor/urlAuthResultRequest>`_. ``match_codes`` Returns: ``bool`` """ __slots__: List[str] = ["url", "match_code"] ID = 0xc9a47b0b QUALNAME = "functions.messages.CheckUrlAuthMatchCode" def __init__(self, *, url: str, match_code: str) -> None: self.url = url # string self.match_code = match_code # string @staticmethod def read(b: BytesIO, *args: Any) -> "CheckUrlAuthMatchCode": # No flags url = String.read(b) match_code = String.read(b) return CheckUrlAuthMatchCode(url=url, match_code=match_code) def write(self, *args) -> bytes: b = BytesIO() b.write(Int(self.ID, False)) # No flags b.write(String(self.url)) b.write(String(self.match_code)) return b.getvalue()