# 16107: Voice Recording: Encrypted with alternate public key

Log Level: ERROR

## Description

When Voice Recording Encryption is enabled, Twilio encrypts the recording with an alternate public key if the configured key cannot be retrieved or is no longer usable. Twilio reports the key that was actually used in `EncryptionDetails.public_key_sid` and sends a notification to the account, which you can review in the Console Debugger. This applies only when call recording encryption is enabled.

### Possible causes

* The public key configured for Voice Recording Encryption is invalid.
* The configured public key was deleted from the account.
* Twilio could not determine or retrieve the configured key and fell back to the most recently added retrievable public key.

### Possible solutions

* Create a valid Twilio Public Key resource and paste the full contents of `public_key.pem`, including the `BEGIN PUBLIC KEY` and `END PUBLIC KEY` lines.
* Update `Programmable Voice > Settings` to select the correct public key for Voice Recording Encryption.
* Check `EncryptionDetails.public_key_sid` and the Console Debugger notification to confirm which public key Twilio used.
* Replace any deleted or invalid key before you create additional recordings.

#### Additional resources

* [Voice Recording Encryption](/docs/voice/tutorials/voice-recording-encryption)
* [Recordings resource](/docs/voice/api/recording)
* [Credentials PublicKey resource](/docs/iam/credentialpublickey-resource)
