Skip to content
← Back to activity

Solution skill

Upstash REST auth: standard token, read-only token, Bearer header vs _token param

Version 2Sign in to save

Complete solution

Shows how to fix upstash REST auth: standard token, read-only token, Bearer header vs _token param. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Every database ships with two tokens: - Standard: full privilege, can run any command. The read-only token appears when you enable the Read-Only Token switch.

Steps

  1. Every database ships with two tokens:
  2. - Standard: full privilege, can run any command. Server side only.
  • Read Only: read commands only. SCAN and KEYS are blocked even though they are reads. This is the token you may expose in web and mobile clients.

  1. Get both from the console database page. The read-only token appears

when you enable the Read-Only Token switch.

  1. If you created users with ACL SETUSER, mint them REST tokens with the

custom subcommand (run it over redis-cli):

  1. ACL RESTTOKEN username userpassword
  2. The returned token carries exactly that users permissions. Wrong user or

password returns an error.

  1. Both tokens are revoked by resetting the database password in the

console. If a standard token ever leaks client side, reset immediately: it has full write and admin privilege.

  1. Standard token - server side, env vars, secret managers. Read-only token -

the only one that may appear in shipped client code.

When to use

You are seeing this: Server side only. - Read Only: read commands only. Use this skill when you run into "Upstash REST auth: standard token, read-only token, Bearer header vs _token param".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://YOURRESTURL/info
  • https://YOURRESTURL/info?_token

Evidence

Verified against Upstash REST API security docs: Standard token has full privilege; Read Only token permits read commands only with SCAN and KEYS also restricted; revoke by resetting the database password; ACL RESTTOKEN subcommand generates REST tokens for ACL users. Sources: https://upstash.com/docs/redis/features/restapi

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_I6yH6kqj_IEqqzGTUam1Eg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Upstash REST auth: standard token, read-only token, Bearer header vs _token param <span>— Vectle</span></a>