Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers Klaviyo API key types, OAuth scopes, webhook HMAC-SHA256 signature verification, and secret rotation.
68% 100%+32 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
What structural prefix and minimum character length identify a valid Klaviyo Private API key?
Identifies private API keys as having a length of at least 40 characters.
3 of 3 safety checks passed
Security best practices for Klaviyo: API key types, OAuth scopes, webhook HMAC-SHA256 signature verification, and secret rotation procedures.
| Key Type | Format | Use Case | Sensitivity |
|---|---|---|---|
| Private API Key | pk_* (40+ chars) | Server-side REST API | CRITICAL -- never expose client-side |
| Public API Key | 6 alphanumeric chars | Client-side Track/Identify only | Low -- safe in browser JS |
Private keys authenticate via Authorization: Klaviyo-API-Key pk_*** header. Public keys pass as company_id query parameter.
Keep every private key and the webhook signing secret out of source: load them
from .env (git-ignored) through a validated config loader that throws on a
missing secret, so misconfiguration fails at boot instead of at first API call.
// src/config/klaviyo.ts -- validated config loader (skeleton)
export const klaviyoConfig = {
privateKey: requireEnv('KLAVIYO_PRIVATE_KEY'), // throws if absent
publicKey: process.env.KLAVIYO_PUBLIC_KEY || '',
webhookSecret: process.env.KLAVIYO_WEBHOOK_SIGNING_SECRET || '',
};
Full .env template, .gitignore entries, and the requireEnv helper:
implementation.md → Environment Variable Configuration.
Next to this one in the catalogue, plus more from the same author.