シンプルな統合
任意の言語から、HTTPS経由でREST APIを直接呼び出せます。APIドキュメントの説明に従って、サインイン、アカウント詳細の取得、サーバーの操作を行えます。
- RESTful API デザイン
- 包括的なドキュメント
example.ts
// Plain HTTPS calls to the REST API
const API = 'https://api.orbai.world/api/v1';
// Sign in and receive an access token
const login = await fetch(`${API}/auth/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'your_password',
platform: 'web', // a script sign-in, not a VPN device
}),
});
// Accounts with two-factor sign-in get requires_2fa here instead of tokens.
const { data } = await login.json();
// Read the signed-in account
const me = await fetch(`${API}/users/me`, {
headers: { Authorization: `Bearer ${data.tokens.access_token}` },
});
console.log(await me.json());APIの特長
認証
メールまたはソーシャルログインでトークンを取得
レート制限
制限があります。レート制限のドキュメントをご覧ください。
Hylon API キー
API を通じて Hylon API キーの作成、一覧表示、無効化ができます。
WebSocket
WebSocket でリアルタイムの通知とチャットを受け取れます。
APIエンドポイント
POST
/api/v1/auth/registerユーザーアカウントを作成GET
/api/v1/users/meユーザー詳細を取得GET
/api/v1/subscriptions/currentサブスクリプションを取得GET
/api/v1/serversVPNサーバーを一覧表示GET
/api/v1/vpn/connectionアクティブな接続を取得GET
/api/v1/vpn/usage帯域幅の使用状況を取得