Download the PHP package ottimis/ermes-php-sdk without Composer

On this page you can find all versions of the php package ottimis/ermes-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ermes-php-sdk

ermes-php-sdk

PHP SDK for the Ermes notification platform. Handles event ingestion, inbox proxy, user token generation, and JWKS exposure.

Requirements

Installation

Via company VCS repository, add to your composer.json:


Configuration

Option A — explicit (recommended for multi-project setups)

Option B — from environment variables

Env var Required Description
NOTIFICATION_CORE_URL yes Base URL of the Ermes core server
NOTIFICATION_TENANT_KEY yes Logical tenant identifier
NOTIFICATION_APPLICATION_ID yes Producer application identifier
NOTIFICATION_ISSUER yes iss claim expected in JWTs
NOTIFICATION_API_KEY yes Basic auth key for event ingestion
NOTIFICATION_API_SECRET yes Basic auth secret for event ingestion
NOTIFICATION_RSA_PRIVATE_KEY yes* RSA private key PEM (inline, \n escaped)
NOTIFICATION_RSA_PRIVATE_KEY_PATH yes* Path to RSA private key PEM file
NOTIFICATION_KID no Key ID for JWKS (default: key-1)

*Either NOTIFICATION_RSA_PRIVATE_KEY or NOTIFICATION_RSA_PRIVATE_KEY_PATH is required.


Tenant registration

Before using the SDK, your tenant must be registered on the Ermes core. This is a one-time operation done by the platform operator:

The response returns credentials.api_key and credentials.api_secret. Store them immediately — they are shown only once.

Your backend must expose /.well-known/jwks.json so the Ermes core can validate user JWTs. Use getJwks() for this:


Sending events

tenant_key, application_id, and event_id are injected automatically by the SDK.


User token (Socket.IO + inbox API)

The frontend needs a signed JWT to connect to the Ermes WebSocket and call the inbox HTTP API directly. Issue it from your backend:

The JWT claims structure is fixed by the SDK to match Ermes server expectations. The private key is encapsulated — the only way to obtain a valid signed token is through these methods.

Frontend Socket.IO connection:


Inbox proxy methods

These methods act as a proxy: your backend generates a user-scoped JWT internally and forwards the request to the Ermes core. The frontend never calls the Ermes core HTTP API directly.

List notifications

Unread count

Sync (cursor-based, preferred for incremental updates)

Mark as read

All mark methods return ['success' => bool, 'statusCode' => int].


InboxItem shape

All notification items (from getNotifications, syncNotifications, Socket.IO event notification.new) share the same shape:

Field Type Notes
notification_uuid string (UUID) Public identifier. Use for deduplication.
topic string Logical category (e.g. contracts.approved)
title string Short display title
body string|null Notification body, markdown or plain text
severity string|null info | warning | error | success
entity_type string|null Domain entity type (e.g. contract)
entity_id string|null Domain entity identifier
payload object|null Custom JSON metadata from producer
read_at string|null ISO 8601. null if unread
created_at string ISO 8601 creation timestamp

Error handling

All methods return an array. Check success before using body:

Common error codes from the core:

Code HTTP Meaning
unauthorized 401 Missing or invalid credentials
invalid_token 401 JWT invalid (signature, claims, expiry)
invalid_payload 400 Request body does not match schema
invalid_recipient_user 400 A user ID looks like a room name instead of a user ID
tenant_mismatch 403 tenant_key in payload does not match authenticated tenant
rate_limited 429 Rate limit exceeded (events: 100/min, read: 300/min per user)
unknown_tenant 400 Tenant key not found or inactive

All versions of ermes-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
firebase/php-jwt Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ottimis/ermes-php-sdk contains the following files

Loading the files please wait ...