Skip to main content

account.saveSecureValue

Securely save Telegram Passport document, for more info see the passport docs »

func (c *Client) AccountSaveSecureValue(ctx context.Context, request *AccountSaveSecureValueRequest) (*SecureValue, error)

Calling this method

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

res, err := api.AccountSaveSecureValue(ctx, &tg.AccountSaveSecureValueRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *SecureValue
return nil
})

Parameters

NameTypeRequiredDescription
ValueInputSecureValueyesSecure value, for more info see the passport docs »
SecureSecretIDint64yesPassport secret hash, for more info see the passport docs »

Returns

*SecureValue

Possible errors

CodeTypeDescription
400PASSWORD_REQUIREDA 2FA password must be configured to use Telegram Passport.
400SECURE_SECRET_REQUIREDA secure secret is required.

References