Narro docs
Loading…
Four credentials, each for one job. Your server uses a partner key, and the key by itself is the credential: Authorization: Bearer against one base URL, no signature. Browsers and founders never see it.
| Credential | Who holds it | Used for | Lifetime and shape |
|---|---|---|---|
| Partner key | Your server only. | Server to server calls and MCP: roster, codes, modules, usage, webhooks, and minting the two tokens below. | narro_pk_test_... in the sandbox, narro_pk_live_... in production. Sent as Authorization: Bearer to https://api.thenarro.com/programs/v1. Scoped to one cohort, to scopes, and to a network scope. The key alone is the credential: no signature, and no key id, program id or cohort id. Limited life, rotated on a schedule. Each key also has a public id, such as key_live_7F3K-9Q2M-X, that is not the secret and is safe to quote to support. A program key works only on the Programs API: a key from the Data API does not work here, and the reverse. |
| Founder session | The founder's browser, on the Narro side. | The Narro portal and the widgets once a founder has signed in. | A secure, host-only cookie that Narro sets. 12 hours at most, 60 minutes after the last activity. You never see it. |
| Widget token | The founder's browser, handed over by your server. | One widget on one page, for one founder or anonymous. | An opaque string you mint with POST /widget-tokens. At most 10 minutes (ttl_seconds can ask for 30 to 600). Bound to one widget and one origin. Sent as the t query parameter on the iframe URL or as a bearer value. A call with it must carry the page origin in Origin or Referer, or Narro refuses it. |
| Founder token | Your server, for one founder. | Calls that act as one founder, with only that founder's data. | An opaque string you mint with POST /founder-tokens when the founder is signed in on your platform, naming them by program email (member id is optional and must match the roster). 15 minutes. Keep it on your server: the default is a server-held founder token, not handed to the browser or the app. Scopes are a subset of the founder scopes. Optional single origin. Sent as a bearer value, on the routes that accept a founder session. Minting another one for the same founder retires the earlier ones after 2 minutes (rotation_overlap_seconds), after which they answer 401, so keep one token per founder and always use the newest. At most 8 are live per founder on a live key; test keys are not capped. |
Treat all four as opaque. Do not parse them and do not log them. The reference lists, route by route, which of them a call accepts. See Endpoints.
refresh_after and proxies the founder's reads. It is not handed to the browser or the app. A browser would only ever get a separate origin-bound widget token, which expires in minutes and is useless on any other widget or origin. Widgets are not launched yet, so do not build on them.Send exactly one credential. A request that carries a cookie and a bearer value, or a bearer value and a t parameter, is refused with 401. So is an unknown authorization scheme, and a credential the route does not accept. A credential that the route accepts but that lacks the scope for it is refused with 403.
Founders sign in with two things: an access code and the program email on your roster.
POST /cohorts/{id}/codes:issue). Narro stores only a hash. The plain code is shown to you once, or emailed by Narro, depending on delivery.POST /auth/redeem).GET /auth/magic/{token}). Opening it in the browser that entered the code consumes the code and starts the session.409 with signin_confirmation_required, which keeps its specific code in production. The person then types the program email the code was issued for (POST /auth/magic/{token} with confirm_email). A wrong email is the same generic invalid_code answer and does not use up the link. 5 wrong emails end the link.Why the answer is generic. A code proves the founder holds the invitation. The emailed link proves they control the inbox. If the form told a caller which part was wrong, it could be used to find valid codes or to check whether an email is on a roster. Because the code is only consumed when the link is opened, someone who guesses a code cannot burn the real founder's code, and a link that expires unopened leaves the code usable. Tying the link to the browser that asked for it stops someone from signing a victim's browser in as the attacker's account with a link of their own. A link scanner that opens the email first does not use the link up.
Attempts are rate limited: 5 per program email and 20 per network address in an hour, and 10 failures lock the form for an hour. Treat both as normal. A founder whose email matches an existing Narro account is asked to confirm linking it before the session starts.
Request signing is not required. A read needs the key, and a write needs the key and an Idempotency-Key. A request that does carry signing headers is verified, so a signer you already run keeps working.
Narro asks for signatures in one case: after it sees unusual use of a key, it puts that key under a security step-up and asks it to sign its requests, reads and MCP calls included. The error then reads as an unauthorized request. Sign the next requests and the requirement clears. The signing secret for this comes with the key and starts with whsec_. Use the whole string, prefix included, as the HMAC key. A replacement key gets its own. Webhook deliveries are verified with the webhook endpoint's own secret, never this one.
Authorization: Bearer narro_pk_test_<your-key>
Idempotency-Key: <uuid-or-16-to-128-characters>
Narro-Timestamp: 1767225600
Narro-Nonce: <16-to-128-characters>
Narro-Signature: v1=<64-hex-signature>| Header | Value |
|---|---|
Narro-Timestamp | Unix seconds. Must be within 5 minutes (300 seconds) of Narro's clock, in either direction. |
Narro-Nonce | 16 to 128 characters from A to Z, a to z, 0 to 9, underscore and hyphen. Unique per key. |
Narro-Signature | The text v1= followed by the lowercase hex HMAC-SHA256. Header names are not case sensitive: narro-signature is the same header. |
Idempotency-Key | Required on writes, signed or not. See below. |
The signature is:
HMAC-SHA256(signing secret, timestamp + "." + nonce + "." + METHOD + "." + pathAndQuery + "." + rawBody)METHOD is upper case.pathAndQuery is the path and query string exactly as your client puts them in the request line, from the first slash, for example /programs/v1/widget-tokens. No scheme, no host. Sign the path you called. A request to /programs/v1/... is signed over the /programs/v1 path, and a signature made over the public path, /public/standard/v1/..., does not verify on /programs/v1. Narro passes the path and query through to the service unchanged, so what you sign is what Narro verifies.rawBody is the exact bytes you send, as UTF-8. Sign the string you send, not an object you serialize twice. For an empty body use an empty string.Check your signer against this example. It uses a made-up secret and signs a call to /programs/v1/widget-tokens. The signature must match exactly. It was computed with Narro's own signer.
| Part | Value |
|---|---|
| Signing secret | test-secret-for-docs |
| Timestamp | 1767225600 |
| Nonce | 0123456789abcdef0123456789abcdef |
| Method | POST |
| Path and query | /programs/v1/widget-tokens |
| Raw body | {"schema_version":"standard.v1","widget":"my_cohort"} |
| Header value | v1=ef9fdc1f0a760f4cf70279643bd4dfa8a22a66cb755b637943e6f9504881902f |
// narro-signer.mjs. Only when Narro asks: after unusual use of a key it asks that key to sign its requests (the error reads as unauthorized).
// Server side only. The signing secret comes with the key; it is never needed to start.
import { createHmac, randomBytes } from 'node:crypto';
const SIGNING_SECRET = process.env.NARRO_PROGRAMS_SIGNING_SECRET; // optional, starts with whsec_
// The signed string is: timestamp.nonce.METHOD.pathAndQuery.rawBody
// pathAndQuery is the path you called, from the first slash, for a base of https://api.thenarro.com/programs/v1
export function signRequest({ method, pathAndQuery, body }) {
const timestamp = String(Math.floor(Date.now() / 1000));
const nonce = randomBytes(16).toString('hex'); // 16 to 128 characters of A-Z a-z 0-9 _ -
const payload = timestamp + '.' + nonce + '.' + method.toUpperCase() + '.' + pathAndQuery + '.' + body;
const digest = createHmac('sha256', SIGNING_SECRET).update(payload, 'utf8').digest('hex');
return { 'Narro-Timestamp': timestamp, 'Narro-Nonce': nonce, 'Narro-Signature': 'v1=' + digest };
}# narro_signer.py. Only when Narro asks: after unusual use of a key it asks that key to sign its requests.
# Server side only. The signing secret comes with the key; it is never needed to start.
import hashlib
import hmac
import os
import secrets
import time
SIGNING_SECRET = os.environ.get("NARRO_PROGRAMS_SIGNING_SECRET", "") # optional, starts with whsec_
# path_and_query is the path you called, from the first slash, for a base of https://api.thenarro.com/programs/v1
def sign_request(method, path_and_query, body):
"""The signed string is: timestamp.nonce.METHOD.pathAndQuery.rawBody"""
timestamp = str(int(time.time()))
nonce = secrets.token_hex(16) # 16 to 128 characters of A-Z a-z 0-9 _ -
payload = ".".join([timestamp, nonce, method.upper(), path_and_query, body])
digest = hmac.new(SIGNING_SECRET.encode("utf-8"), payload.encode("utf-8"), hashlib.sha256).hexdigest()
return {"Narro-Timestamp": timestamp, "Narro-Nonce": nonce, "Narro-Signature": "v1=" + digest}Idempotency-Key when you retry the same operation.401. A detailed environment names what was wrong. See Errors and retries.A partner key carries scopes. A call that needs a scope the key lacks is refused with 403 scope_required and a next step. Your test key holds all 24 of them, codes.manage and roster.write included, so the sandbox is the full live experience. A live key carries the scopes it was made with; to add one, create a live key with it in the Hub, switch to it, then revoke the old one.
| Partner key scope | Allows |
|---|---|
cohort.read | Read the key's cohort. |
roster.write | Load or update the cohort roster. |
codes.manage | Issue and revoke access codes. Owner and Admin roles only. |
modules.read | Read modules and their materials. |
modules.write | Create modules and attach materials. |
deliverables.read | Read submission states for the cohort. Status only. |
usage.read | Read aggregate cohort usage and introduction charges. |
webhooks.manage | Register endpoints, read the delivery log and replay events. |
widget_tokens.mint | Mint widget tokens. Implies use of the key for widgets. |
founder_tokens.mint | Mint founder tokens, and use the MCP answers.* tools. The Partner Hub key catalog calls this same permission founders.access: a key that holds founders.access may do both. |
queries.ask | Ask a question for a founder. |
intros.request | Request an intro for a founder, also through MCP. |
sandbox.reset | Reset the synthetic dataset. Test keys only. |
keys.status.read | Read the status of your own keys. |
intros.read | Read the cohort's intro requests and their states. |
intake.write | Send profile facts, metrics and documents for a founder, and read their status. |
matches.read | Let a founder token ask for that founder's matches. Checked on the key that minted the token. |
network.read | Let a founder token run network queries for that founder. Checked on the key that minted the token. |
meetings.read | Let a founder token read that founder's meetings. Checked on the key that minted the token. |
records.read | Let a founder token read that founder's screenings, pitches and deep dives. Checked on the key that minted the token. |
rounds.read | Let a founder token read that founder's rounds. Checked on the key that minted the token. |
rounds.write | Let a founder token start, change and end that founder's round. Checked on the key that minted the token. |
events.read | Let a founder token list events that suit that founder (limited level: 10, next 30 days, 10 calls a day). |
events.full | The full Events API: filters and paging, sign ups, and your own events. Needs the Events API on in the Hub. |
founder_tokens.mint is the permission that POST /founder-tokens and the MCP answers.* tools check. The Partner Hub key catalog names the same permission founders.access: a key that holds founders.access may mint founder tokens and use the answers.* tools. That is the only alias. intros.write is not intros.request, an unknown scope is refused when a key is issued, and ping needs no scope. Nothing here widens what a key may do.
A founder session, widget token or founder token carries founder scopes:
| Founder scope | Allows |
|---|---|
portal.read | Read the founder's own cohort, materials, matches, intros and answers. |
deliverables.write | Submit deliverables. |
intros.request | Request and withdraw intro requests. |
A key is also enabled for one or more uses: the API, MCP and widgets. A key that is not enabled for the surface it calls is refused with 403. A key is limited to one cohort and cannot read another. Where a key may be used from is covered on Key scoping.
Idempotency-Key header, whether it is a partner key, a founder token or a widget token. The sign in routes, which need no credential, do not. The key is 16 to 128 characters from A to Z, a to z, 0 to 9, underscore and hyphen, and a UUID works. A missing or malformed key is refused with 400.Idempotent-Replay: true. Only a success is stored, so a failed write can be retried with the same key.409 with idempotency_conflict. Never reuse a key for a different operation.