MessageKtx.getLoginUrl - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / MessageKtx / getLoginUrl

getLoginUrl

open suspend fun Message.getLoginUrl(chatId: Long, buttonId: Int, allowWriteAccess: Boolean): HttpUrl

Suspend function, which returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button.

Parameters

chatId - Chat identifier of the message with the button.

buttonId - Button identifier.

allowWriteAccess - True, if the user allowed the bot to send them messages.

Return TdApi.HttpUrl Contains an HTTP URL.