Class LoginUrl

java.lang.Object
io.micronaut.chatbots.telegram.api.LoginUrl

public class LoginUrl extends Object
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 Details

    • LoginUrl

      public LoginUrl()
  • Method Details

    • getUrl

      @NonNull public @NonNull String getUrl()
      Returns:
      An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
    • setUrl

      public void setUrl(@NonNull @NonNull String url)
      Parameters:
      url - An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
    • getForwardText

      @Nullable public @Nullable String getForwardText()
      Returns:
      New text of the button in forwarded messages.
    • setForwardText

      public void setForwardText(@Nullable @Nullable String forwardText)
      Parameters:
      forwardText - New text of the button in forwarded messages.
    • getBotUsername

      @Nullable public @Nullable String getBotUsername()
      Returns:
      Username of a bot, which will be used for user authorization.
    • setBotUsername

      public void setBotUsername(@Nullable @Nullable String botUsername)
      Parameters:
      botUsername - Username of a bot, which will be used for user authorization.
    • getRequestWriteAccess

      @Nullable public @Nullable Boolean getRequestWriteAccess()
      Returns:
      Pass True to request the permission for your bot to send messages to the user.
    • setRequestWriteAccess

      public void setRequestWriteAccess(@Nullable @Nullable Boolean requestWriteAccess)
      Parameters:
      requestWriteAccess - Pass True to request the permission for your bot to send messages to the user.
    • toString

      public String toString()
      Overrides:
      toString in class Object