HomeDocsDeveloperIdentity and revenue weighting
Developer
Identity and revenue weighting
Pass a signed identity token to the Reqio widget to identify users and weight their feedback by the revenue they represent.
By default the widget tracks users anonymously. Adding identity lets you:
- Know who submitted what: link requests to real users, not anonymous IDs.
- Weight feedback by revenue: requests from high-value customers rise in your backlog automatically.
- Deduplicate across sessions: the same user's upvotes and submissions merge even if they clear cookies.
Identity is a guided four-step flow at Project > Settings > Identity. The dashboard generates a ready-to-paste snippet for your stack with your real project ID and audience URL already filled in.
Choose your stack
The dashboard asks which server language you use: Next.js, Node.js, Python, PHP, Ruby, or Go. Your choice controls which snippet is shown in the next step.
Generate a signing secret
Click Generate to create a per-project signing secret. Copy it into your server environment as
REQIO_SECRET. It must never be sent to the browser.Mint a token on your server
Paste the snippet from the dashboard into your server code and adapt the user fields to your session model. The snippet uses the standard JWT library for your language, mints a short-lived HS256 JWT, and signs it with
REQIO_SECRET. No Reqio package is required or published.Embed the widget with the token
Pass the token to the widget via the
data-identity-tokenattribute:<script src="https://reqio.app/widget.js" data-project-id="YOUR_PROJECT_ID" data-identity-token="<token minted by your server>" async ></script>Mint a fresh token on every server-rendered request. Tokens expire after 300 seconds (5 minutes).
How it works
Your server mints a short-lived HS256 JWT and passes it to the widget. The widget sends the token with every request; Reqio verifies the signature using the per-project secret. The secret never leaves your server. Tokens are short-lived and audience-bound to one project, so a leaked token cannot be used against a different project.
Token payload
Every token includes:
substringRequiredaudstringRequiredhttps://reqio.app/p/{projectId}. The dashboard fills this in for you.iatnumberRequiredexpnumberRequirediat + 300 (5 minutes).emailstringtraitsobjectRevenue traits
Pass customer billing details inside the traits object to enable revenue-weighted ranking in your backlog. Pro +
{
"plan": "pro",
"amount": 4900,
"interval": "month"
}planstring"pro".amountnumberinterval"month" | "year"amount.Revenue-weighted backlog ordering is a Pro and Scale feature. On Free, these fields are accepted and stored but the backlog still sorts by raw vote count.
CRM enrichment
Pass CRM account fields inside the same traits object to attach account-health context to a requester. All three fields are optional. Scale +
{
"healthScore": 82,
"accountId": "acct_9f2c1a",
"renewalAt": "2026-09-01"
}healthScorenumberaccountIdstringaccountId as fallback).renewalAtstring"2026-09-01". A value that fails to parse is dropped rather than rejecting the token.These three fields are accepted and stored on every plan. The CRM intelligence built on top of them, health-score badges, renewal dates, and at-risk flags in the backlog, is a Scale-only feature. On Pro, the same interface is shown gated with an upgrade hint instead of live data; on Free, it does not appear at all.
Let an AI agent do it for you
The dashboard provides a copy-ready AI agent prompt next to each snippet. Copy it into Claude Code, Cursor, Windsurf, or any AI coding assistant to have the agent add identity to your server automatically. The prompt includes your project ID, audience URL, the correct library, and the full payload structure.
Identifying users from JavaScript
If you cannot pass the token at render time (for example, in a SPA where the user logs in after the initial page load), call window.Reqio.identify() after the user authenticates:
window.Reqio.identify(token);The widget queues calls made before it finishes loading and replays them once it initialises.
Security
REQIO_SECRET must never reach the browser. Store it in an environment variable managed by your deployment platform. Tokens are short-lived (300 seconds) and audience-bound to one project URL.