Skip to main content

account.confirmPhone

Confirm a phone number to cancel account deletion, for more info click here »

func (c *Client) AccountConfirmPhone(ctx context.Context, request *AccountConfirmPhoneRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.AccountConfirmPhone(ctx, &tg.AccountConfirmPhoneRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
PhoneCodeHashstringyesPhone code hash, for more info click here »
PhoneCodestringyesSMS code, for more info click here »

Returns

bool

Possible errors

CodeTypeDescription
400CODE_HASH_INVALIDCode hash invalid.
400PHONE_CODE_EMPTYphone_code is missing.

References