Authorization
PrivMX Bridge supports several authorization methods: API Keys, Signatures, and Access Tokens This section explains how to use them securely and effectively.
API Keys
You can access the API using API Keys.
- API Keys have no time-to-live (TTL), but they can be disabled or deleted.
- Each key has a specific scope.
- You can create up to 10 API Keys with the method
manager/createApiKey.
When you install PrivMX Bridge, you receive your first API Key with full API access.
Creating an API Key
Without Public Key
With Public Key (ED25519 PEM)
API Key Response
Signatures
You can sign your request using your API Key.
1. Prepare Data to Sign
requestData format
The requestData string is always constructed in the following format:
- HTTP_METHOD() → the HTTP method in uppercase (e.g.
POST,GET) - URI() → the request path (e.g.
/api) - RequestBody → the raw JSON payload of the request
- Each part is separated by a newline character (
\n), and the string ends with a newline.
2. Generate Signature
-
HMAC signature:
-
ECC signature (if publicKey was provided):
3. Add Authorization Header
API Key Credentials
You can also authorize requests by including your API Key credentials directly in the Authorization header:
Access Tokens
Access Tokens have a TTL but can be refreshed with Refresh Tokens.
They are generated using the manager/auth method.
Request Example
Response Example
Using Access Token
Refreshing Token
API Scopes
When requesting an Access Token, you can specify the scope, which defines the level of granted access.
| Scope | Description |
|---|---|
session:NAME | Creates a new session with the given name. Each user can have up to 16 sessions; the oldest is removed once the limit is reached. |
ipAddr:ADDR | Restricts the token to connections from a specific IPv4 address. |
expiresIn:NUMBER | Sets custom expiry for the token in milliseconds (cannot exceed the refresh token’s TTL). |
solution | Grants access to Solution API scope. |
context | Grants access to Context API scope. |
thread | Grants access to Thread API scope. |
store | Grants access to Store API scope. |
inbox | Grants access to Inbox API scope. |
stream | Grants access to Stream API scope. |
solution:SOLUTION_ID | Grants access only to Contexts under the given Solution ID. |
solution:* | Grants access to manage all Contexts. |
Scopes enable fine-grained control over permissions and help secure different parts of the system.
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.