30118: Private key is invalid
MESSAGING
ERROR
Twilio returns this error when the private key uploaded for Link Shortening cannot be parsed. Provide the key in PEM format or in PKCS #8 format, and make sure it starts with -----BEGIN PRIVATE KEY----- and ends with -----END PRIVATE KEY-----. Remove any extra newline characters at the beginning or end before you upload the key.
- The private key is not in
PEMformat orPKCS #8format. - The private key does not start with
-----BEGIN PRIVATE KEY-----or end with-----END PRIVATE KEY-----. - The private key includes extra newline characters at the beginning or end.
- Re-upload a private key in
PEMorPKCS #8format with the required begin and end lines. - Remove any leading or trailing newline characters before you submit the key.
- In the Console, paste the private key into the Private key input box. When using the API, send the certificate and private key in the
TlsCertparameter to the Link Shortening domain Certificate subresource.