signedUrl() appends a time-limited exp and sig using your project’s signing secret.
Signature
Requires
signingSecret in the client config, or it throws DreepError. Find it on the
API Keys page of your dashboard.
Unlike url(), this takes the asset rather than a bare URL
string, because the id is part of what gets signed.
With a transform
Why not sign by hand
When a signed URL carries a transform, the API doesn’t verify the signature against the values you sent. It first snapswidth, height, quality and dpr onto fixed
breakpoints — the same ones that bound how many cached variants an asset can have — and
verifies against those.
So a hand-rolled link asking for width=803 is signed against 803 while the API checks
828, and the result is a 401 with nothing obviously wrong in the URL.
The SDK applies the same snapping before signing, and its signatures are verified against
the API’s own signing code. If you do sign by hand, see
Signed URLs — and only for links without transforms.