Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this pageProducts used
Looking for more inspiration?Visit the
Error
Application error

21624: Invalid validity period value

Twilio Messaging DocumentationMessaging

Description

description page anchor

You provided an invalid value for the ValidityPeriod parameter when creating a Message resource. Set ValidityPeriod to an integer from 1 to 36000 seconds.

Possible causes

possible-causes page anchor
  • ValidityPeriod is less than 1
  • ValidityPeriod is greater than 36000
  • ValidityPeriod is not an integer value
  • Your application passes ValidityPeriod in an unsupported format, such as a string with non-numeric characters or a decimal value
  • Update your request so ValidityPeriod is an integer between 1 and 36000
  • Validate the ValidityPeriod value in your application before you send the API request
  • Remove ValidityPeriod from the request if you do not need to override the default message validity behavior
  • Review the code that builds your Messaging API request and confirm the ValidityPeriod parameter is mapped correctly

Additional resources

additional-resources page anchor