Class LoginUrl
java.lang.Object
io.micronaut.chatbots.telegram.api.LoginUrl
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:
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable String@Nullable Boolean@NonNull StringgetUrl()voidsetBotUsername(@Nullable String botUsername) voidsetForwardText(@Nullable String forwardText) voidsetRequestWriteAccess(@Nullable Boolean requestWriteAccess) voidtoString()
-
Constructor Details
-
LoginUrl
public LoginUrl()
-
-
Method Details
-
getUrl
- Returns:
- An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
-
setUrl
- Parameters:
url- An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
-
getForwardText
- Returns:
- New text of the button in forwarded messages.
-
setForwardText
- Parameters:
forwardText- New text of the button in forwarded messages.
-
getBotUsername
- Returns:
- Username of a bot, which will be used for user authorization.
-
setBotUsername
- Parameters:
botUsername- Username of a bot, which will be used for user authorization.
-
getRequestWriteAccess
- Returns:
- Pass True to request the permission for your bot to send messages to the user.
-
setRequestWriteAccess
- Parameters:
requestWriteAccess- Pass True to request the permission for your bot to send messages to the user.
-
toString
-