API Documentation
The Client Identifier API is a specialized Node.js service designed to identify chat clients based on unique nonce strings. It plays a critical role in the Hermit ecosystem by providing client-specific context to the backend.
Key Features
- Identifer Endpoint: Exposes a robust
POST /identifyendpoint. - Regex Mapping: Uses configurable regex patterns to map nonces to specific client names.
- Encoding Support: Automatically detects and decodes
Base64-Encodednonces before matching. - Extensible Configuration: Easy to update via the
clients.jsonfile.
Technical Stack
- Runtime: Node.js
- Framework: Express.js
- Middleware: Body-parser
API Usage
Base URL
https://api.hermitweb.xyz
Identify Client
POST /identify
Request Body:
{
"nonce": "your-client-nonce-string"
}
Response:
{
"ClientName": "HermitX"
}
Configuration
Client definitions are stored in clients.json. Each entry supports:
ClientName: The human-readable name of the client.Type: The format of the nonce (e.g.,Numeric,Prefix,Base64-Encoded).regex: The pattern used for matching.