# 30045: Validity Period is less than zero or greater than maximum allowed

Log Type: APPLICATION

Log Level: WARNING

## Description

Set the Validity Period to a supported value before you send the message. This warning appears when the value provided in your API request or inherited from a Messaging Service is outside the allowed range. the maximum Validity Period for outbound messages as 36,000 seconds, or 10 hours.

### Possible causes

* You set `ValidityPeriod` on the message request to a value outside the supported range for outbound messages. Twilio accepts integer values in seconds and documents a maximum of 36,000 seconds.
* You send the message with a Messaging Service, and the service-level `validityPeriod` is configured outside the supported range.
* You provided the value in a format other than an integer number of seconds.

### Possible solutions

* Update `ValidityPeriod` in your API request to an integer number of seconds within the supported range and no higher than 36,000 seconds.
* If you send through a Messaging Service, review the service configuration and set `validityPeriod` to an integer from 1 to 36,000 seconds.
* Remove the custom value to use the default Validity Period of 36,000 seconds when that fits your use case.

#### Additional resources

* [Message resource API reference](/docs/messaging/api/message-resource)
* [Messaging Services](/docs/messaging/services)
* [Service resource API reference](/docs/messaging/api/service-resource)
