Skip to content

Authentication Models

The Partner portal uses API key + HMAC-SHA256 authentication exclusively. There is no JWT, no Secure Channel, and no browser session model for Partner API integrations.

API Key Authentication

Every request to /api/v1/partner/** must include these headers:

HeaderDescription
X-Api-KeyYour provisioned API key
AuthorizationHMAC-SHA256 <signature>
X-TimestampUnix epoch seconds (must be within ±60s of server time)
X-NonceUnique per-request identifier (UUID recommended)

Signature Construction

stringToSign = METHOD + "\n" + PATH + "\n" + TIMESTAMP + "\n" + NONCE + "\n" + BODY
signature   = Base64(HMAC-SHA256(apiSecret, stringToSign))

Walkthrough

  1. Concatenate the five components with newline separators
  2. Compute HMAC-SHA256 using your API secret as the key
  3. Base64-encode the resulting binary digest
  4. Place the result in the Authorization header as HMAC-SHA256 <signature>

Example (GET, no body)

METHOD    = GET
PATH      = /api/v1/partner/constants/countries
TIMESTAMP = 1709337600
NONCE     = 550e8400-e29b-41d4-a716-446655440000
BODY      = (empty string)

stringToSign = "GET\n/api/v1/partner/constants/countries\n1709337600\n550e8400-e29b-41d4-a716-446655440000\n"

Replay Protection

  • Timestamp: Requests with a timestamp older than 60 seconds are rejected (GA2013)
  • Nonce: Each nonce may only be used once; reuse is rejected (GA2014)
  • Generate a fresh nonce (e.g. UUID v4) for every request

API Key Lifecycle

ActionEndpoint
CreatePOST /web/v1/partner/api-keys (via portal UI)
ListGET /web/v1/partner/api-keys
DisablePOST /web/v1/partner/api-keys/{id}/disable
EnablePOST /web/v1/partner/api-keys/{id}/enable
DeleteDELETE /web/v1/partner/api-keys/{id}

Common Errors

CodeCause
GA2001Missing X-Api-Key
GA2002Missing X-Signature
GA2003Missing X-Timestamp
GA2004Missing X-Nonce
GA2011API key invalid or not found
GA2012Signature verification failed
GA2013Timestamp outside validity window
GA2014Nonce already used
GA2021API key disabled
GA2022IP not in whitelist

Last updated:

SlaunchX Internal Documentation