messages.AcceptUrlAuth

class pyrogram.raw.functions.messages.AcceptUrlAuth

Use this to accept a Seamless Telegram Login authorization request, for more info click here »

Details:
  • Layer: 227

  • ID: 67A3F0DE

Parameters:
  • write_allowed (bool, optional) – Set this flag to allow the bot to send messages to you (if requested)

  • share_phone_number (bool, optional)

  • peer (InputPeer, optional) – The location of the message

  • msg_id (int 32-bit, optional) – Message ID of the message with the login button

  • button_id (int 32-bit, optional) – ID of the login button

  • url (str, optional) – URL used for link URL authorization, click here for more info »

  • match_code (str, optional) – N/A

Returns:

UrlAuthResult

TL Schema

messages.acceptUrlAuth#67a3f0de
flags:#
write_allowed:flags.0?true
share_phone_number:flags.3?true
peer:flags.1?InputPeer
msg_id:flags.1?int
button_id:flags.1?int
url:flags.2?string
match_code:flags.4?string

= UrlAuthResult

Parameter Tree

AcceptUrlAuth
├── write_allowed → true (optional)
├── share_phone_number → true (optional)
├── peer → InputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── msg_id → int (optional)
├── button_id → int (optional)
├── url → string (optional)
└── match_code → string (optional)

Example

await app.invoke(
    AcceptUrlAuth(
        write_allowed=None,
        share_phone_number=None,
        peer=await app.resolve_peer(chat_id),
        msg_id=0,
        button_id=0,
        url="https://google.com",
        match_code="text",
    )
)