AcceptUrlAuthRequest
Only users can use this request. See code examples.
---functions--- 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
Returns
| UrlAuthResult |
This type can be an instance of either:
| UrlAuthResultAccepted | UrlAuthResultDefault |
| UrlAuthResultRequest |
Parameters
| write_allowed | flag | This argument defaults to None and can be omitted. |
| share_phone_number | flag | This argument defaults to None and can be omitted. |
| peer | InputPeer | This argument defaults to None and can be omitted. Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.). |
| msg_id | int | This argument defaults to None and can be omitted. |
| button_id | int | This argument defaults to None and can be omitted. |
| url | string | This argument defaults to None and can be omitted. |
| match_code | string | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.messages.AcceptUrlAuthRequest(
write_allowed=True,
share_phone_number=True,
peer='username',
msg_id=42,
button_id=42,
url='some string here',
match_code='some string here'
))
print(result.stringify())