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
| Name | Type | Required | Description |
|---|---|---|---|
Value | InputSecureValue | yes | Secure value, for more info see the passport docs » |
SecureSecretID | int64 | yes | Passport secret hash, for more info see the passport docs » |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PASSWORD_REQUIRED | A 2FA password must be configured to use Telegram Passport. |
| 400 | SECURE_SECRET_REQUIRED | A secure secret is required. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.saveSecureValue#899fe31d