AuthKit
/API Reference
Back to Showcase
POST/api/v1/auth/initiateAuth: ApiKey

Initiate Authentication

Initiate an authentication flow for any supported channel (passkeys, whatsapp, telegram, discord, qr, push, totp, email, or sms). Generates an ephemeral session ID.

Request Headers
HeaderValueDescription
X-Publishable-Keypk_live_...Tenant publishable client key
Content-Typeapplication/jsonJSON payload
Body Parameters
ParameterTypeRequiredDescription
providerstringRequiredOne of: "passkeys", "whatsapp", "whatsapp_meta", "telegram", "discord", "qr", "push", "totp", "email", "sms".
e.g. "whatsapp"
targetIdentifierstringRequiredUser identifier: phone number (+91...), email, username, or Telegram handle.
e.g. "+919876543210"
sessionIdstringOptionalOptional custom session ID. If omitted, a cryptographic 24-byte hex ID is generated.
e.g. "sess_9f8b2c4e1a"
redirectUrlstringOptionalDestination URL for deep-links or OAuth redirects.
e.g. "https://yourapp.com/dashboard"
Client Implementation
Terminal Command
curl -X POST https://auth.zorviktech.com/api/v1/auth/initiate \
  -H "X-Publishable-Key: pk_live_9f8b2c" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "whatsapp",
    "targetIdentifier": "+919876543210"
  }'
Response Schemas
200Session initiated successfully
{
  "success": true,
  "sessionId": "sess_3f8b912a7e",
  "provider": "whatsapp",
  "actionUrl": "https://wa.me/918001234567?text=VERIFY%203F8B91",
  "expiresIn": 300
}
400Validation failure or channel unconfigured
{
  "success": false,
  "error": "Target identifier is required."
}