Back

Blog details

AIOZ Stream API Keys: Upload-Only vs Full-Access Roles

AIOZ Network
7 min readAugust 08, 2026
aioz-streamdeveloper-apisguide
AIOZ Stream API keys: upload only vs full access roles

AIOZ Stream API keys come in two roles: full_access can do every action on your account, and only_upload can only upload video. Give an integration the upload-only role, and a leaked key can add uploads but cannot delete your library or mint new keys.

This guide covers what each role allows, how to create and manage keys through the API, and the security practices AIOZ Stream's own docs recommend once you run more than one key.

TL;DR:

  • Two key roles exist: full_access ("all the actions with the api key") and only_upload ("only upload video to AIOZ Stream").
  • The docs tell you to record the secret at creation, because it "will not be accessible again."
  • A key's TTL can go up to 2147483647 seconds, about 68 years, but the docs advise a real expiration for anything temporary.
  • Least privilege, expiration, rotation and never exposing secrets client-side all come straight from AIOZ Stream's API key management guide.

Updated Oct 29, 2026: a shorter answer-first opening, shorter sentences, question headings, a labelled diagram of the two roles and the rotation steps, a corrected note on which host the create call uses, and a closing section with the list request from the docs.

What is the difference between full_access and only_upload keys?

The API reference describes full_access as covering "all the actions with the api key" and only_upload as restricted to "only upload video to AIOZ Stream." The API key management guide spells out the boundary.

An upload-only key is meant for end users who upload videos to your account. They "cannot manage videos, delete content, or access other areas of your account." A full-access key is for admins: it can upload, delete, edit and manage all video content. It can also create, update and delete other API keys, and it reaches every feature and setting.

That last point sets the stakes: a leaked full-access key can mint new keys for whoever holds it, so it should never be your default for an external system.

Labelled diagram comparing AIOZ Stream full_access and only_upload API keys, with the four rotation steps: create the new key, deploy it, confirm it works, delete the old key
What each AIOZ Stream key role can do, and how to rotate a key. Source: AIOZ Stream API key docs.

How do you create an AIOZ Stream API key?

You create a key with a name, a TTL in seconds and a type. The name is required, and the type is either full_access or only_upload:

POST /api/api_keys
{
  "api_key_name": "cms-integration",
  "ttl": "2592000",
  "type": "only_upload"
}

The response returns the key's public identifier, its secret and a truncated copy of that secret:

{
  "status": "success",
  "data": {
    "api_key": {
      "id": "...",
      "name": "cms-integration",
      "public_key": "...",
      "secret": "...",
      "truncated_secret": "...",
      "type": "only_upload",
      "expired_at": "..."
    }
  }
}

Save the secret from this response. The reference says to record it "as they will not be accessible again." If you lose it, delete the key and create a new one; you cannot recover the old secret.

Listing, renaming and deleting keys

Beyond creation, the API gives you three management calls. You can list keys with a name search, offset and limit paging (default 25, max 100), and sorting by name or creation date. You can rename a key with a PATCH request, but the name is the only field you can change, so its role and TTL stay fixed. Deleting a key revokes it immediately.

One detail is worth checking in your own client. The reference lists the create endpoint as https://aiozstream.network/api/api_keys, but its own cURL sample for that call uses api.aiozstream.network. The list, update and delete endpoints are all on api.aiozstream.network. If a create call fails with a routing error rather than an auth error, check the host before you debug the key.

Two ways to authenticate

Requests can carry either a bearer token or a pair of dedicated headers, stream-public-key and stream-secret-key. Both are documented as valid. Pick a bearer token if your client already handles tokens that way, or use the header pair if you want the public and secret keys explicit in your request code. The Node.js SDK guide and the Go client guide show how each SDK takes that key pair.

Security practices from AIOZ Stream's guide

The API key management guide lists four rules, and each one maps to a choice you make when you issue a key:

  • Scope: "Always use the most restrictive role necessary for a given use case."
  • Expiration: "For API keys used in temporary contexts, always set an expiration date," instead of leaving the TTL at its maximum.
  • Rotation: "Periodically regenerate and replace API keys to reduce the risk of unauthorized access."
  • Storage: "Never expose your secret tokens in client-side code or publicly accessible environments."

The storage rule protects against a common leak. Secrets committed to public repositories get found by scanners, which is why GitHub runs secret scanning on public code. Scoped keys address the risks at the top of the OWASP API Security Top 10 (2023), where broken object level authorization ranks first and broken function level authorization fifth.

These rules matter more here because a leaked full_access key can create and revoke other keys, not just touch video. If you also run into limits on request volume, our guide to HTTP 429 and rate limit headers covers that side.

A delegation example: a CMS plugin

Say a CMS plugin needs to upload video to your account, and you do not want to hand over full control. Give it an only_upload key named for its purpose, such as cms-integration, so you can spot it in a list later. Set the TTL to how long the integration should run, not the maximum.

If you replace the plugin or the contract ends, deleting that one key revokes exactly that access. No other key changes, and you do not rotate credentials across unrelated systems. That is the payoff of the two-role split: a compromised or retired key only affects what it was created for.

How do you rotate an API key without downtime?

Rotate with a create-then-delete sequence, because you only see a secret once and there is no "regenerate" action on an existing key. Follow these four steps in order:

  1. Create the new key with the same role and a name that makes the swap obvious.
  2. Deploy the new credential to whatever uses it.
  3. Confirm that requests with the new key succeed.
  4. Delete the old key.

Do not delete the old key first, because a deleted key fails at once from the caller's side and you cannot restore it while you debug. A short overlap where both keys are valid costs you nothing and removes that failure mode.

How AIOZ Stream handles it

AIOZ Stream keeps access control simple: two roles, a TTL per key, a rename-only update and immediate revocation on delete. What the docs don't cover yet: any finer scope between the two roles, such as read-only or per-video keys. If you need one, design around only_upload plus your own backend.

To audit the keys you already have, the reference documents this list request. It searches by name and sorts by creation date:

GET https://api.aiozstream.network/api/api_keys?search=name&limit=5&offset=1&sort_by=created_at&order_by=asc
Authorization: Bearer your_access_token_here

Run it on a schedule and delete any key whose name you no longer recognize. Where API keys fit in the wider platform is covered in our AIOZ Stream developer guide. Next step: read the AIOZ Stream API keys reference.

Frequently Asked Questions

Can I see a key's secret again after creating it?
No, the docs say to record the secret at creation because it will not be accessible again. If you lose it, delete the key and create a new one.

What is the practical difference between full_access and only_upload?
Full access covers every action, including managing other API keys. Only upload is limited to uploading video and cannot manage or delete content or reach other areas of the account.

Can I change a key's role after creating it?
No, the update endpoint only renames a key. To change its role, create a new key with the right type and delete the old one.

What is the maximum TTL for a key?
The documented maximum is 2147483647 seconds, about 68 years. The docs advise a real expiration for temporary use instead of the maximum.

How do I rotate a key without breaking whatever uses it?
Create the new key first, deploy it and confirm it works, then delete the old one, since a deleted key fails at once and cannot be restored.

Do I have to use a bearer token, or can I use the public and secret key headers?
Either works: bearer tokens and the stream-public-key/stream-secret-key header pair are both documented ways to authenticate.

Is it risky to put a secret key in client-side JavaScript?
Yes, AIOZ Stream's guide says never to expose secret tokens in client-side code, and anything shipped to a browser can be read. Treat a secret that reaches a browser as compromised.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

What Is MPEG-DASH? How the MPD Manifest File Works

MPEG-DASH streams adaptive video over HTTP from an XML MPD file. See a real MPD: Periods, AdaptationSets, Representations, segment addressing and live MPDs.

aioz-stream
8 min readDecember 04, 2026
blog thumbnail

What Is CMAF? The Common Media Application Format Explained

What is CMAF? The ISO format that packages video as fragmented MP4 so one set of files serves HLS and DASH, with its chunks, brands and low-latency role.

aioz-stream
8 min readDecember 01, 2026
blog thumbnail

CBR vs VBR vs CRF and When to Use Each Rate Control Mode

CBR vs VBR vs CRF explained: what each video rate control mode holds fixed, how maxrate and bufsize cap it, our x264 test results, and which mode to use where.

aioz-stream
7 min readNovember 27, 2026
blog thumbnail

Live Streaming API Tutorial for Sessions and Real-Time Stats

A live streaming API tutorial for AIOZ Stream: create a session, push RTMP, poll real-time stats every 5 to 30 seconds, then list the saved recordings.

aioz-stream
7 min readNovember 24, 2026
blog thumbnail

Restream to Multiple Platforms With AIOZ Stream Multicast

Restream to multiple platforms by sending one feed to a relay. Learn the bandwidth math, platform rules and how AIOZ Stream multicast forwards your RTMP stream.

aioz-stream
6 min readNovember 20, 2026
blog thumbnail

MPEG-TS vs fMP4 for HLS Segments and When to Use Each

MPEG-TS vs fMP4 for HLS: how 188-byte TS packets and fMP4 init segments differ, what each costs in overhead, which codecs need fMP4, and when TS still fits.

aioz-stream
7 min readNovember 17, 2026