Skip to Content
GuidesAuthentication

Authentication and key safety

Use workspace API keys for server-to-server HTTP and MCP access. Send the key with every request:

Authorization: Bearer <FUPISHA_API_KEY>

Keys are created and revoked from the signed-in dashboard’s API keys page. Fupisha shows the full secret once when it is created, then stores a hash and displays only a prefix. If a key is exposed, revoke it and create a replacement.

Scopes

ScopeAllows
links:readList and inspect links, read analytics, and list available domains.
links:writeCreate and delete links.
bulk:writeCreate up to 100 links per request.

The dashboard lets you select scopes and an expiry of one week, one month, one year, or never. API requests are always restricted to the key’s workspace. Expired or revoked keys return 401; a valid key without the needed scope returns 403.

Server-side example

const apiKey = process.env.FUPISHA_API_KEY; if (!apiKey) throw new Error('FUPISHA_API_KEY is not configured'); const response = await fetch('https://api.fupisha.link/v1/links?limit=20', { headers: { Authorization: `Bearer ${apiKey}` } }); if (!response.ok) { const error = await response.json(); throw new Error(`${error.error.code}: ${error.error.message}`); } const { data: links } = await response.json();

Never put a production key in frontend JavaScript, a mobile binary, logs, source control, or analytics events. Use a secret manager in production and separate keys by environment or integration.