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
| Name | Type | Required | Description |
|---|---|---|---|
PhoneCodeHash | string | yes | Phone code hash, for more info click here » |
PhoneCode | string | yes | SMS code, for more info click here » |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CODE_HASH_INVALID | Code hash invalid. |
| 400 | PHONE_CODE_EMPTY | phone_code is missing. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.confirmPhone#5f2178c3