Getting Started v1

API Authentication

Learn how to authenticate requests to the KLIC REST API using Bearer tokens and x-api-key headers.

Updated Yesterday 1 min read Verified
SDK & Request Quickstart Select your language
# Verify your Bearer token & workspace identity
curl -X GET https://klic.in/api/v1/auth/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://klic.in/api/v1/auth/verify', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const user = await response.json();
console.log('Authenticated Workspace:', user.data.workspaceName);
import requests

response = requests.get(
    "https://klic.in/api/v1/auth/verify",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

print(response.json())
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");

var response = await client.GetAsync("https://klic.in/api/v1/auth/verify");
string json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => 'https://klic.in/api/v1/auth/verify',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY']
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://klic.in/api/v1/auth/verify", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
200 OK 18ms application/json
{
  "status": "success",
  "data": {
    "id": "link_9a482b1c",
    "shortUrl": "https://klic.in/launch2026",
    "destination": "https://mybrand.com/launch-promo",
    "domain": "klic.in",
    "clicks": 0,
    "createdAt": "2026-08-20T13:36:12.842Z"
  }
}

API Authentication

All requests to the KLIC REST API must be authenticated using an active secret API Key.

API Key Header

Pass your API key in the standard Authorization header:

HTTP
Authorization: Bearer klic_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Or via the x-api-key header:

HTTP
x-api-key: klic_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Security Best Practices

Important
Keep your API key secret. Never expose it in client-side applications, public code repositories, or frontend bundles.
  • Store keys in secure environment variables.
  • Rotate compromised keys immediately from the workspace dashboard.