Layer 227
MessagesAcceptUrlAuth
Use this to accept a Seamless Telegram Login authorization request, for more info click here
method
Users
messages.acceptUrlAuth#67a3f0de flags:# write_allowed:flags.0?true share_phone_number:flags.3?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string match_code:flags.4?string = UrlAuthResult;
Parameters
| Name | Type | Description |
|---|---|---|
| WriteAllowed | flags .0? true | Set this flag to allow the bot to send messages to you (if requested) |
| SharePhoneNumber | flags .3? true | Set this flag to share the user's phone number with the bot (if requested via url Auth Result Request. request_phone_number and consented to by the user) |
| Peer | flags .1? InputPeer | The location of the message |
| MsgId | flags .1? int | Message ID of the message with the login button |
| ButtonId | flags .1? int | ID of the login button |
| Url | flags .2? string | URL used for link URL authorization, click here for more info |
| MatchCode | flags .4? string | If url Auth Result Request. 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. check Url Auth Match Code |
Returns
UrlAuthResultGogram Example
// MessagesAcceptUrlAuth - using Params struct result, err := client.MessagesAcceptUrlAuth(&tg.MessagesAcceptUrlAuthParams{ WriteAllowed: nil, SharePhoneNumber: nil, Peer: nil, MsgId: nil, ButtonId: nil, Url: "Hello, World!", MatchCode: "Hello, World!", }) if err != nil { // handle error } // result is *tg.UrlAuthResult