Skip to main content
CometChat generates pre-signed URLs for all media files, including images, audio, video, and documents shared in chat. A pre-signed URL embeds a cryptographic signature and an expiry timestamp directly in the URL, so files are accessible only within a defined time window without requiring API credentials on the client side. This feature is enabled by default for all newly created apps. Existing apps can opt in from the CometChat dashboard.

How It Works

When a media file is sent or retrieved, CometChat returns a pre-signed URL in the following format:
Pre-signed URLs are returned across all surfaces - SDK responses, REST API, and webhook payloads.

Configuring the TTL

The TTL (Time-to-Live) controls how long a generated pre-signed URL remains valid. To configure the TTL:
  1. Go to the CometChat Dashboard.
  2. Select your app and navigate to Chat & MessagingSettings.
  3. Under Pre-Signed URLs, set your desired TTL value.
  4. Save your changes.
Pre-Signed URL TTL configuration in CometChat Dashboard
TTL configuration is available on all plans. Changes take effect for all new pre-signed URLs generated after saving; existing URLs retain their original expiry.