MadelineProtoDocs/old_docs/API_docs_v104/constructors/inputKeyboardButtonUrlAuth.md

43 lines
2.5 KiB
Markdown
Raw Normal View History

2019-08-15 20:25:16 +02:00
---
title: inputKeyboardButtonUrlAuth
2019-12-27 17:48:04 +01:00
description: Button to request a user to [authorize](../methods/messages.acceptUrlAuth.md) via URL using [Seamless Telegram Login](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots).
2019-08-15 20:25:16 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: inputKeyboardButtonUrlAuth
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Button to request a user to [authorize](../methods/messages.acceptUrlAuth.md) via URL using [Seamless Telegram Login](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots).
2019-08-15 20:25:16 +02:00
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|request\_write\_access|[Bool](../types/Bool.md) | Optional|Set this flag to request the permission for your bot to send messages to the user.|
|text|[string](../types/string.md) | Yes|Button text|
|fwd\_text|[string](../types/string.md) | Optional|New text of the button in forwarded messages.|
|url|[string](../types/string.md) | Yes|An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data).<br>NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization).|
|bot|[InputUser](../types/InputUser.md) | Optional|Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details.|
2019-08-15 20:25:16 +02:00
### Type: [KeyboardButton](../types/KeyboardButton.md)
### Example:
```php
$inputKeyboardButtonUrlAuth = ['_' => 'inputKeyboardButtonUrlAuth', 'request_write_access' => Bool, 'text' => 'string', 'fwd_text' => 'string', 'url' => 'string', 'bot' => InputUser];
```
Or, if you're into Lua:
```lua
inputKeyboardButtonUrlAuth={_='inputKeyboardButtonUrlAuth', request_write_access=Bool, text='string', fwd_text='string', url='string', bot=InputUser}
```