s.id Logo
s.id
Nền tảng nhà phát triển

Tài liệu API

URL cơ sở: https://api.s.id/v2

Thử tài liệu tương tác

Xác thực

Truyền API key của bạn dưới dạng Bearer token trong mỗi yêu cầu.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Mỗi key có phạm vi riêng. Yêu cầu đến endpoint thiếu phạm vi cần thiết sẽ trả về 403 insufficient_scope.

Links

MethodPath
GET/links
POST/links
POST/links/available
GET/links/{short}
PUT/links/{short}
DELETE/links/{short}
POST/links/{short}/unarchive
GET/links/{short}/stats
GET/links/{short}/stats/lifetime
POST/links/bulk

User

MethodPath
GET/user
GET/quota

Microsites

MethodPath
GET/microsites
POST/microsites
GET/microsites/{slug}
PUT/microsites/{slug}
DELETE/microsites/{slug}
POST/microsites/available
GET/microsites/{slug}/components
POST/microsites/{slug}/components
PUT/microsites/{slug}/components/{componentId}
DELETE/microsites/{slug}/components/{componentId}
POST/microsites/{slug}/components/order

Analytics

MethodPath
GET/stats

QR

MethodPath
GET/qr
PUT/qr
GET/links/{short}/qr
PUT/links/{short}/qr

OAuth 2.0

MethodPath
GET/oauth/authorize
POST/oauth/token
POST/oauth/revoke
GET/oauth/userinfo
GET/api/user/oauth/apps
DELETE/api/user/oauth/apps/{clientId}

Tham chiếu phạm vi

links:readList and read links
links:writeCreate and update links (create, edit, restore)
links:archiveArchive links
links:analyticsRead per-link click statistics and lifetime counts
qr:readRead QR code settings (global and per-link)
qr:writeCustomize QR code settings (global and per-link)
user:readRead the authenticated user profile and account quota
microsites:readRead microsites
microsites:writeCreate, update, delete and manage components of microsites

Giới hạn tốc độ

38 yêu cầu mỗi phút cho mỗi API key. Vượt quá giới hạn sẽ trả về HTTP 429.

StatusMeaning
200Success
400Bad request — check your parameters
401Missing or invalid API key
403Forbidden — key lacks required scope (insufficient_scope)
404Resource not found
429Rate limit exceeded
500Server error — retry with backoff