Last updated on October 23, 2026
The SDK key
Where your SDK key comes from, where to keep it, and how the client reads it.
Your key
Every call carries your SDK key. Appnigma gives you your key when your microserver is set up. Ask Appnigma for a new one if you need to replace or cancel it.
The key starts with apn_live_ and is shown once.
Keep the key on your server, in the APPNIGMA_SDK_KEY environment variable. Never put it in a browser or a repo.
Start a client
The client reads the key from APPNIGMA_SDK_KEY:
import { Appnigma } from "@appnigma/sdk";
const appnigma = new Appnigma();From CommonJS:
const { Appnigma } = require("@appnigma/sdk");require "appnigma"
client = Appnigma::Client.newfrom appnigma import Appnigma
client = Appnigma()If you keep the key somewhere else, pass it in. A passed key wins:
const appnigma = new Appnigma({ key: await secrets.get("appnigma-sdk-key") });client = Appnigma::Client.new(key: secrets.fetch("appnigma-sdk-key"))client = Appnigma(key=secrets.get("appnigma-sdk-key"))A missing or wrong key
A client started with no key at all, or with a key that does not start with apn_live_, fails at once, before any call. In TypeScript it throws SdkAuthError. In Ruby it raises Appnigma::AuthError, and in Python AuthError.