Before you start
You need four values from your partner setup:Become a partner
To become a Namespace partner, contact support@namespace.so. The Namespace team sets up your partner account, registers your public key, and gives you your partner ID, issuer, and key ID. While you wait, you can start building the parts of your platform that run inside a tenant with your own workspace. See Build on your own workspace.Create a partner client
Sign partner tokens
A partner token is an ES256-signed JWT with these fields, prefixed with The TypeScript SDK caches the token and calls
oidc_:Wrap the signing in a token source.
The client asks the token source for a token when it needs one, and asks again when the current token is about to expire, so a long-running service always sends a valid token.
issueToken again when fewer than five minutes of validity remain.
The Go SDK calls IssueToken for every request, which signs a new token each time. Signing is local and cheap.Test Partner Token Source
Create a partner client with the token source, then list your tenants to confirm it authenticates.
Listing tenants is a read-only call, which makes it a safe first request.A new partner account has no tenants yet, so
Found 0 tenants is a successful result.
The partner client exposes the tenant and token services, and it is the partnerClient that the rest of the multi-tenancy docs start from.Next steps
Create tenants
Give each of your customers their own tenant.
Tenant tokens
Act inside a tenant on behalf of a customer.