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
Complete, copy-paste-ready code for the workflow summarized in SKILL.md. Each
section maps to a step in the skill body.
# .env (NEVER commit)
KLAVIYO_PRIVATE_KEY=pk_***************************************
KLAVIYO_PUBLIC_KEY=UXxxXx
KLAVIYO_WEBHOOK_SIGNING_SECRET=whsec_*************************
# .gitignore -- mandatory entries
.env
.env.local
.env.*.local
// src/config/klaviyo.ts -- validated config loader
function requireEnv(name: string): string {
const value = process.env[name];
if (!value) throw new Error(`Missing required env: ${name}`);
return value;
}
export const klaviyoConfig = {
privateKey: requireEnv('KLAVIYO_PRIVATE_KEY'),
publicKey: process.env.KLAVIYO_PUBLIC_KEY || '',
webhookSecret: process.env.KLAVIYO_WEBHOOK_SIGNING_SECRET || '',
};
Create separate API keys per environment with minimal scopes:
| Environment | Recommended Scopes | Rationale |
|---|
Next to this one in the catalogue, plus more from the same author.