Skip to main content

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

NameTypeRequiredDescription
URLstringyesThe OAuth deep link
MatchCodestringyesThe emoji or code selected by the user from the list in urlAuthResultRequest match_codes

Returns

bool

References