Skip to main content

messages.acceptUrlAuth

Use this to accept a Seamless Telegram Login authorization request, for more info click here »

func (c *Client) MessagesAcceptURLAuth(ctx context.Context, request *MessagesAcceptURLAuthRequest) (URLAuthResultClass, error)

Calling this method​

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesAcceptURLAuth(ctx, &tg.MessagesAcceptURLAuthRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // URLAuthResultClass
return nil
})

Parameters​

NameTypeRequiredDescription
WriteAllowedbool—Set this flag to allow the bot to send messages to you (if requested)
SharePhoneNumberbool—Set this flag to share the user's phone number with the bot (if requested via urlAuthResultRequest.request_phone_number and consented to by the user)
PeerInputPeerClass—The location of the message
MsgIDint—Message ID of the message with the login button
ButtonIDint—ID of the login button
URLstring—URL used for link URL authorization, click here for more info »
MatchCodestring—If urlAuthResultRequest.match_codes was set, the emoji or code selected by the user from the provided list; must always be provided when match_codes is set, even if match_codes_first was set and the code was already validated via messages checkUrlAuthMatchCode

Returns​

URLAuthResultClass

References​