Enabling Restriction
- Dashboard
- SDK
- API
Navigate to Settings → Aggregator and toggle Require authentication. Choose the access mode that fits your use case.
Access Modes
TherestrictedMode field controls how clients present their access token. Use your Tusky API key as the token.
Header (default)
The client sends theApi-Key header with every request:
Query parameter
The client appends?api-key= to the URL:
<img> tags, <video> sources, direct download links, or window.open() calls.
Path prefix
The client embeds the token at the start of the URL path:All three modes use the same access token — your Tusky API key. You can create a scoped key with only
files:read permission specifically for aggregator access. See API Keys for the full scopes reference.Access Mode Comparison
| Mode | Token location | Use case |
|---|---|---|
header | Api-Key: request header | Server-side, SDK, secure clients |
query | ?api-key= URL parameter | <img> tags, direct browser links |
path | /{token}/v1/blobs/... URL prefix | CDN path routing, presigned links |
Scoped Keys for Aggregator Access
Create a read-only API key to limit the blast radius if the token is ever exposed:Create a scoped key
Go to dashboard.tusky.io/account/api-keys and create a new key. Grant only the
files:read scope.What’s Next
API Keys
Create scoped keys for aggregator access.
Custom Domains
Serve restricted content through your own branded domain.
Analytics
Monitor who is accessing your restricted aggregator.