Skip to content

Create Authentication Token

This section explains how to securely generate an x-api-key which acts as an access token for API authentication.

🟢 What is x-api-key?

The x-api-key is a secure token generated by hashing your systemId and systemSecret using the HMAC-SHA256 algorithm.
It is required for authenticating with ZIGNAL’s external APIs.

🔐 Generate x-api-key

Example in Node.js

js
import crypto from "crypto";

const systemId = "example-system-id";
const systemSecret = "example-secret-key";

const xApiKey = crypto
  .createHmac("sha256", systemSecret)
  .update(systemId)
  .digest("hex");

console.log(xApiKey);

⚠️ Keep your systemSecret secure. Never expose it in client-side code.

🧾 Required Headers for Authentication

HeaderDescription
X-System-IdSystem ID you received from Home menu
X-Api-KeyHMAC-SHA256 hash from the script

Once you have your access token, you can proceed to use it in requests such as the Send Notify External.