Shorten a link

batch · $0.0020

A share URL, turned into a short one.

POST https://api.sorina.sh/v1/tiktok/links/shorten

Body

share_url string
A tiktok.com URL. Anything else is refused before it leaves us. It is not tied to one kind of content — video, photo, profile, sound, playlist and tag URLs all work.

A type written with ? is optional. Unknown fields are rejected rather than ignored, and the whole body is capped at 64 KiB.

Example

curl -X POST https://api.sorina.sh/v1/tiktok/links/shorten \
  -H "authorization: Bearer $SORINA_KEY" \
  -H 'content-type: application/json' \
  -d '{"share_url":"https://www.tiktok.com/@tiktok/video/7669519434716826894"}'

What comes back

238 bytes of JSON: shorten_url — a tiktok.com/t/<code>/ link — and status_code, where 0 means it worked.

A share URL copied out of the app carries the sharer’s own identifiers in its query string. Strip them before you send one; you are shortening a link, not forwarding somebody’s session.