getLoginUrl - libtd-ktx

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


libtd-ktx / kotlinx.telegram.coroutines / getLoginUrl

getLoginUrl

suspend fun TelegramFlow.getLoginUrl(chatId: Long, messageId: 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.

messageId - Message identifier of the message with the button.

buttonId - Button identifier.

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

Return HttpUrl Contains an HTTP URL.