Short links, SMS, and one-time passwords — from your backend, in a few lines.
| Language | Repository | Install |
|---|---|---|
| Node / TypeScript | lihi-js | npm install @lihi.io/sdk |
| PHP | lihi-php | composer require lihi/lihi-php |
Both are written from the same recorded API responses and tested against each other, so they behave the same way on the cases that matter.
import { Lihi } from '@lihi.io/sdk'
const lihi = new Lihi({ basicApiKey: process.env.LIHI_BASIC_API_KEY })
const { shortUrl } = await lihi.basic.shorten('https://example.com')
// https://lihi.cc/AbCdEuse Lihi\Lihi;
$lihi = Lihi::basic('YOUR_API_KEY');
echo $lihi->shorten('https://example.com')->getShortUrl();
// https://lihi.cc/AbCdE| API | Plan | What it does |
|---|---|---|
| Basic | Starter | Shorten a URL. One method, nothing to configure |
| Short URL | Business, once approved | Click counts, edits, deletes, tags, expiry, batches of up to 5000 |
| SMS & OTP | Starter, plus an SMS key | Send messages, schedule them, verify one-time passwords |
Credentials come from app.lihi.io under API.
The three credentials are not interchangeable. A key issued for one API is refused by the others, and the refusal does not say so. It is the most common first failure. Give the SDK the keys you have and it will tell you which one is missing before it sends anything.
Links in an SMS need a domain registered in advance. Taiwanese law requires it, and a message carrying an unregistered domain is rejected — short links and your own site alike. If you are sending into Taiwan from elsewhere, get the carrier allowlist approval through before your first send.
Each SDK's README is the reference, and both read in ten languages: English · 繁體中文 · 简体中文 · 日本語 · 한국어 · Español · Português · Français · Italiano · Русский
- SDK bugs and feature requests: open an issue on the repository concerned
- Account, billing and plans: lihi.io
- Domains: LihiDomain — buy one there and the short URL service comes with it