FluxyAPIFluxyAPI
BlocksMedia & Design

Sign Media URL

Generate a secure, temporary access link for a private media file using its Media ID.

The Sign Media URL block is used to create a new, time-limited access link for a file that was previously uploaded with the Private URL (Signed) option enabled. This allows you to grant temporary access to a file multiple times without re-uploading it.

Core Concept

Think of this block as a temporary guest pass generator. The file is locked in a private vault, and this block issues a "pass" (a signed URL) that works for a specific amount of time. Once the pass expires, the file remains in the vault, but a new pass must be generated to see it again.

Configuration

FieldRequiredDescription
Media IDThe unique ID of the hosted media file (e.g., {hosted_file.media_id}).
Link Validity DurationHow long the generated link remains valid. Choices: 5 Minutes to 7 Days.
Output VariableThe variable name where the result object containing the new URL will be stored.

URL Anatomy

A signed URL is composed of several security layers. Below is the full structure of a signed URL for a FluxyAPI Branding Asset.

https://api.fluxyapi.dev/media/CegiAqyse4wBs4Rc/fluxy-icon.png?ex=1777651274&t=6e18260462f55a2624ad579b2b2acb3b

Media Service & ID

https://api.fluxyapi.dev/media/CegiAqyse4wBs4Rc/

This part identifies the FluxyAPI Media Service and the specific Media ID of your file.

Resource Name

fluxy-icon.png

The name of your file. We recommend using clean, descriptive English names (e.g., fluxy-icon.png) for better resource management and SEO.

Expiration Timestamp (ex)

?ex=1777651274

This Unix timestamp determines exactly when the link expires. It ensures that your private media isn't exposed longer than necessary.

Security Signature (t)

&t=6e18260462f55a2624ad579b2b2acb3b

The Security Token is a cryptographic signature that validates the entire URL. If the expiration timestamp or Media ID is altered, the signature becomes invalid, and access is blocked.

Signature Security

The generated URL is cryptographically signed. If any part of the URL (like the expiration timestamp) is tampered with, the link will immediately become invalid.

Supported File Types

  • Images: png, jpg, jpeg, gif, webp, svg, bmp, ico, tiff, tif, avif, heic, heif, jfif, pjpeg, pjp
  • Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, rtf
  • Text & Code: json, txt, html, htm, css, js, xml, csv, md, yaml, yml
  • Audio: mp3, wav, ogg, flac, aac, m4a, wma, opus
  • Video: mp4, webm, avi, mov, mkv, flv, wmv, 3gp, m4v
  • Archives: zip, tar, gz, rar, 7z, bz2
  • Fonts: woff, woff2, ttf, otf, eot

Error Handling

  • MEDIA_ID_MISSING — Triggered when no Media ID is provided.
  • SIGN_FAILED — Triggered if the signed URL could not be generated (e.g., the Media ID is invalid or the file has been deleted).
  • RUNTIME_ERROR — Triggered if an unexpected error occurs during execution.

Example

  1. Media ID: {hosted_file.media_id} (from a previous Host Media block)
  2. Link Validity Duration: 1 Hour
  3. Output Variable: secure_link

Result: The variable {secure_link.url} will contain a new signed URL like the one shown above. You can safely share this link, knowing it will automatically expire after one hour.

On this page