Kruiger Labs
Client Portal Get Started
DocumentationIAA BOT
Sign inGet support
IAA BOT

IAA BOT API Security

Implement bearer authentication, HMAC SHA256 signing, timestamps, nonce replay prevention, and safe secret storage.

View IAA BOT Product

Required request headers#

HeaderValue
AuthorizationBearer <IAA_API_KEY>
X-IAA-TimestampCurrent request timestamp in the contract’s expected format.
X-IAA-NonceUnique random value used once.
X-IAA-SignatureHMAC SHA256 signature.
X-IAA-Bot-Guild-IDCalling bot guild identity where required.

Signature input#

The signing input is the ordered value:

METHOD
PATH_AND_QUERY
TIMESTAMP
NONCE
SHA256_BODY

Compute the HMAC SHA256 with IAA_API_SIGNING_SECRET. Both sides must use identical method casing, path and query encoding, timestamp, nonce, body bytes, separators, and digest encoding.

Backend validation order#

  1. Validate the bearer API key.
  2. Reject timestamps outside the configured freshness tolerance.
  3. Reject a nonce that has already been used within the replay window.
  4. Recompute the body SHA256 and HMAC signature.
  5. Compare signatures with a timing-safe function.
  6. Validate the guild identity where the route requires it.
  7. Store the nonce as used only for the required replay-prevention period.

Secret handling#

Back to top