Authentication

The Kundli.Click API authenticates API requests via Bearer tokens in the HTTP Authorization header. All API requests must be made over HTTPS.


Base URLs & Environments

We provide a dual-environment setup. The stateless architecture ensures the exact same calculation logic applies to both, but the Sandbox uses cached ephemeris tables to prevent server load.

Environment Base URL Key Prefix
Production https://api.kundli.click/v1/ kndl_sk_live_
Sandbox (Free) https://sandbox.api.kundli.click/v1/ kndl_sk_test_

Bearer Token Usage

Include your secret key in the Authorization header of your HTTP request. Keys are tied to your billing account (in INR ₹). Do not expose your secret keys in frontend client-side code (e.g., React, Vue). Requests must originate from a backend server.

Security Notice

If GitHub or our automated scanners detect a leaked kndl_sk_live_ key in a public repository, the key will be immediately revoked to prevent billing fraud.

Authentication Errors

If authentication fails, the API returns a 401 Unauthorized response. Common reasons include missing headers, expired keys, or sandbox keys used on production endpoints.

Note: For the full interactive code playground, view this page on a desktop browser.

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API Key provided. Ensure you are passing a Bearer token."
  }
}