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
WriteAllowedboolSet this flag to allow the bot to send messages to you (if requested)
SharePhoneNumberboolSet 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)
PeerInputPeerClassThe location of the message
MsgIDintMessage ID of the message with the login button
ButtonIDintID of the login button
URLstringURL used for link URL authorization, click here for more info »
MatchCodestringIf 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