Quickbase Tips

Stop hard-coding user tokens in Quickbase code pages

SecurityAPI & integrationsDecember 1, 2026
Short answerAnyone with access to the app can read a code page's source, including any user token in it. Use temporary tokens instead: they're generated from the signed-in user's session, scoped to an app or table, and expire after 5 minutes.

The problem

A code page calls the Quickbase RESTful API with a user token pasted into the JavaScript. It works, but anyone with access to the app can read the code page source and copy that token. If it belongs to an admin, they now have admin API access.

The fix: temporary tokens

The RESTful API can issue a temporary token for the person who is already signed in, scoped to an app or table. It expires after 5 minutes, so there’s nothing long-lived to steal, and every call runs with that user’s own permissions.

const REALM = 'yourcompany.quickbase.com';

async function getTempToken(dbid) {
  const res = await fetch(`https://api.quickbase.com/v1/auth/temporary/${dbid}`, {
    method: 'GET',
    credentials: 'include', // uses the signed-in user's Quickbase session
    headers: {
      'QB-Realm-Hostname': REALM,
      // 'QB-App-Token': '...', // only if the app requires application tokens
    },
  });
  if (!res.ok) throw new Error(`Temp token failed: ${res.status}`);
  return (await res.json()).temporaryAuthorization;
}

async function queryRecords(tableId, body) {
  const token = await getTempToken(tableId);
  const res = await fetch('https://api.quickbase.com/v1/records/query', {
    method: 'POST',
    headers: {
      'QB-Realm-Hostname': REALM,
      'Authorization': `QB-TEMP-TOKEN ${token}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ from: tableId, ...body }),
  });
  return res.json();
}

Gotchas

  • The prefix is QB-TEMP-TOKEN, not QB-USER-TOKEN.
  • Request the token for the table you’re querying. Builders often report that a token requested for the app ID is refused for table-level calls, while one requested for the table works.
  • Tokens expire after 5 minutes. Request a fresh one per action, or refresh before it expires, for pages that stay open.
  • Permissions follow the user. That’s the point: the page can only do what the signed-in user is allowed to do.

Sending a token to an outside tool

If a button needs to hand off to your own service, formula URL and rich text fields can be set to POST a temporary token when clicked. Your service receives it as a TempToken body parameter and acts on behalf of that user, with nothing stored.

How to prevent it

Treat any token in client-side code as public. Long-lived user tokens belong only on servers, in a secrets manager.

Seeing more than one of these problems? Find where your Quickbase is on the journey, and what usually fixes it.

Bigger than a quick fix?

App Development

New apps built around how your business actually works, including moving you off spreadsheets, Access or another platform.

Discovery & app blueprint · From $2,750

Have a Quickbase problem that needs solving?

Tell us what is slowing you down. A 30-minute call is free, and you will leave with a clear next step whether or not we work together.

Book a free call

Loading available times…