Authorization

Two ways to authenticate: an API key with HTTP Basic or an OAuth 2.1 token in the Bearer header.

On this page

Every API request must have an Authorization header. Hypris accepts two schemes: Basic with an API key and Bearer with an OAuth 2.1 token.

Which method to choose

SituationMethod
Your own script, a server-to-server integration, an automation in n8nAPI key (Basic)
An app your users sign in to with their Hypris accountOAuth 2.1 (Bearer)
An AI assistant via MCPOAuth 2.1, the client handles it
An integration that should act as an app, not as youApp key (Basic)

API key: HTTP Basic

A key consists of an ID and a secret. Join them with a colon, base64-encode them and send them in the header:

Header
Authorization: Basic base64(keyId:secret)

Most tools will do it for you:

curl "https://api.hypris.com/v1/me" -u "$KEY_ID:$SECRET"

Hypris checks user keys first, then app keys. The differences between them are described in the API keys guide.

OAuth token: Bearer

An app that has gone through the OAuth 2.1 flow sends an access token:

Header
Authorization: Bearer <access_token>

The access token is valid for an hour. After that, refresh it with the refresh token, without the user signing in again.

Workspace in the request

There's no separate workspace header. The workspace or resource ID is always in the path, for example /workspace/:workspaceId/databases or /database/:databaseId. An OAuth token is also bound to the workspace chosen on the consent screen.

When authorization fails

CodeWhat it means
401Missing header, wrong key ID or secret (including an ID in the wrong format), disabled or expired key, expired token. With a wrong key, the message is always Authorization failed, without saying which part is wrong.
403Authentication succeeded, but permissions for the resource are missing.

Details and sample responses are in the Errors and limits guide.