Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

30118: Private key is invalid


ERROR: 30118

error-30118 page anchor
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.

Possible causes

possible-causes page anchor
  • The private key is not in PEM format or PKCS #8 format.
  • 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 PEM or PKCS #8 format 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 TlsCert parameter to the Link Shortening domain Certificate subresource.

Additional resources

additional-resources page anchor