tgbotxx
1.1.6.9
Telegram Bot C++ Library
|
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: More...
#include <LoginUrl.hpp>
Public Member Functions | |
LoginUrl ()=default | |
LoginUrl (const nl::json &json) | |
nl::json | toJson () const |
Serializes this object to JSON. More... | |
void | fromJson (const nl::json &json) |
Deserializes this object from JSON. More... | |
Public Attributes | |
std::string | url |
An HTTPS 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. More... | |
std::string | forwardText |
Optional. New text of the button in forwarded messages. More... | |
std::string | botUsername |
Optional. Username of a bot, which will be used for user authorization. See 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 for more details. More... | |
bool | requestWriteAccess {} |
Optional. Pass True to request the permission for your bot to send messages to the user. More... | |
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
Definition at line 11 of file LoginUrl.hpp.
|
default |
|
inlineexplicit |
Definition at line 13 of file LoginUrl.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 48 of file LoginUrl.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 38 of file LoginUrl.hpp.
std::string tgbotxx::LoginUrl::botUsername |
Optional. Username of a bot, which will be used for user authorization. See 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 for more details.
Definition at line 31 of file LoginUrl.hpp.
std::string tgbotxx::LoginUrl::forwardText |
Optional. New text of the button in forwarded messages.
Definition at line 26 of file LoginUrl.hpp.
bool tgbotxx::LoginUrl::requestWriteAccess {} |
Optional. Pass True to request the permission for your bot to send messages to the user.
Definition at line 34 of file LoginUrl.hpp.
std::string tgbotxx::LoginUrl::url |
An HTTPS 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.
Definition at line 23 of file LoginUrl.hpp.