invalid_expiration
The request is a signed URL, but its expires parameter is out of range. The API does not check the signature and does not render anything. Sign a new URL with a valid expiry. This page is part of the error code reference.
| HTTP status | 401 Unauthorized |
error.type |
authentication_error |
error.retryable |
false |
| Credits used | 0 |
Example response
{ "error": { "type": "authentication_error", "code": "invalid_expiration", "message": "Signed URL expires must be at most 30 days in the future", "retryable": false, "docs": "https://renderscreenshot.com/docs/errors/invalid-expiration" }, "request_id": "req_abc123" }
Causes
- The expiry is more than 30 days ahead. Signed URLs are credentials, so the API caps their lifetime at 30 days (plus 5 minutes for clock drift).
expiresis in milliseconds.Date.now()in JavaScript returns milliseconds. A millisecond value is not accepted. The message isexpires must be a Unix timestamp in seconds.expiresis not a number. A date string such as2026-12-01or a value such astomorrowis rejected with the same message.
How to fix it
- Send
expiresas an integer Unix timestamp in seconds. - Keep it at most 30 days after the time the URL will be fetched.
- For an image that must work for longer than 30 days, use the public CDN link from the
X-Cache-URLheader, or copy the image to your own bucket.
A past expires returns expired_signature instead.