Skip to main content

Keep tokens server-side

KarFlows API tokens must live on your backend. Bad:
Good:

OTP verification

Your backend should:
  1. Call send OTP.
  2. Store pinId against the user/session.
  3. Ask the customer for the code.
  4. Call verify OTP.
  5. Mark the phone as verified only when KarFlows returns success.

Sender names

Never let users type arbitrary sender names in your public UI. Store approved sender names server-side and send only those values to KarFlows.

Webhook signatures

Verify X-KarFlows-Signature against the raw request body before parsing JSON. Reject stale timestamps and store the delivery ID to prevent duplicate processing.

Logging

Never log API tokens, OTP codes, webhook signing secrets, or complete customer message bodies. KarFlows redacts sensitive OTP and upstream delivery details from customer-facing logs.