You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I think it would be really cool to support signed URLs to prevent unwanted API usage from third parties. When you self-host the DiceBear API, it's often publicly exposed, which means anyone who has the URL to your instance can use it without authentication. Having a signature parameter that signs the whole URL using a symmetric key (e.g. hmac-sha256) would be extremely helpful to restrict access to authenticated requests only.
Hi @0x1618, thanks a lot for this idea! Signed URLs are here, and you can try them in v4.14.0-rc.5:
docker pull dicebear/api:4.14.0-rc.5
Set SIGNING_SECRETS and the avatar endpoints only answer URLs that end in a sig parameter. It works almost exactly like your example, and exp is in there as an optional expiry too:
/10.x/constellation/svg?backgroundColor=101219&constellationColor=c3cdef&seed=123&exp=1700000000&sig=<hmac-sha256 of everything before &sig>
The guide in the repo explains how to sign a URL, with examples in JavaScript, PHP, Python, Rust, Go, Dart and C#.
I'd love to hear how it works for you. If something feels off, just tell me here, there's still time to change it before the final release.
Activity
feat: add signed URLs
FlorianKoerner commentedon Nov 21, 2026
Hi @0x1618, thanks a lot for this idea! Signed URLs are here, and you can try them in
v4.14.0-rc.5:Set
SIGNING_SECRETSand the avatar endpoints only answer URLs that end in asigparameter. It works almost exactly like your example, andexpis in there as an optional expiry too:The guide in the repo explains how to sign a URL, with examples in JavaScript, PHP, Python, Rust, Go, Dart and C#.
I'd love to hear how it works for you. If something feels off, just tell me here, there's still time to change it before the final release.
0x1618 commentedon Nov 21, 2026
@FlorianKoerner thanks! I tested the feature and it looks good to me.