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
| Name | Type | Required | Description |
|---|---|---|---|
WriteAllowed | bool | — | Set this flag to allow the bot to send messages to you (if requested) |
SharePhoneNumber | bool | — | 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) |
Peer | InputPeerClass | — | The location of the message |
MsgID | int | — | Message ID of the message with the login button |
ButtonID | int | — | ID of the login button |
URL | string | — | URL used for link URL authorization, click here for more info » |
MatchCode | string | — | 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
References
- Official documentation
- Generated Go reference
- TL definition:
messages.acceptUrlAuth#67a3f0de