messages.checkUrlAuthMatchCode
Validate the match code selected by the user against the code shown on the login page, as part of the OAuth authorization flow ». Only usable when both match_codes and match_codes_first are set in the urlAuthResultRequest returned by messages.requestUrlAuth. If boolTrue is returned, proceed with the login flow and pass the verified code to messages.acceptUrlAuth.match_code.
func (c *Client) MessagesCheckURLAuthMatchCode(ctx context.Context, request *MessagesCheckURLAuthMatchCodeRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesCheckURLAuthMatchCode(ctx, &tg.MessagesCheckURLAuthMatchCodeRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
URL | string | yes | The OAuth deep link |
MatchCode | string | yes | The emoji or code selected by the user from the list in urlAuthResultRequest match_codes |
Returns
bool
References
- Official documentation
- Generated Go reference
- TL definition:
messages.checkUrlAuthMatchCode#c9a47b0b