Layer 220
AuthBindTempAuthKey
Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.
method
Users
Bots
Parameters
| Name | Type | Description |
|---|---|---|
| PermAuthKeyId | long | Permanent auth_key_id to bind to |
| Nonce | long | Random long from Binding message contents |
| ExpiresAt | int | Unix timestamp to invalidate temporary key, see Binding message contents |
| EncryptedMessage | bytes | See Generating encrypted_message |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | ENCRYPTED_MESSAGE_INVALID | Encrypted message invalid. |
| 400 | EXPIRES_AT_INVALID | The specified expires_at timestamp is invalid. |
| 400 | TEMP_AUTH_KEY_ALREADY_BOUND | The passed temporary key is already bound to another perm_auth_key_id. |
| 400 | TEMP_AUTH_KEY_EMPTY | No temporary auth key provided. |
Gogram Example
// AuthBindTempAuthKey - positional arguments result, err := client.AuthBindTempAuthKey(int64(0), int64(0), 0, []byte{}) if err != nil { // handle error } // result is *tg.Bool