ToAPIsToAPIs
アカウント照会

アカウント情報の取得

システムアクセストークンで自身のアカウントデータを取得

GET
/api/v1/account

中国本土のユーザー向け: 中国本土のユーザーは https://toapis.cn を API エンドポイント (Base URL)としてご利用ください. 本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください.

認証, ページ分割, エラーは利用ガイドを参照してください.

動作

自身の id, display_name, created_at, region, locale, account_type のみ返します. 不明な過去の時刻, 地域, 言語は null です. 種別は normal または sub. メール, ユーザー名, 認証情報は返しません.

認証

Authorizationstringヘッダー必須

Bearer YOUR_SYSTEM_ACCESS_TOKEN を使用します. モデル API キーは使用できません. X-User-Id は不要です.

パラメータ

パスパラメータ, クエリパラメータ, リクエストボディは使用しません.

リクエスト例

curl --request GET \
  --url 'https://toapis.com/api/v1/account' \
  --header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'
import requests

response = requests.get(
    "https://toapis.com/api/v1/account",
    headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://toapis.com/api/v1/account");

const response = await fetch(url, {
  headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
  signal: AbortSignal.timeout(30_000),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());

レスポンスフィールド

例は架空のデータで, credits_per_usd="100" を仮定しています. 実際の換算にはレスポンスの値を使用してください.

codeinteger

結果コード. 0 は成功です.

messagestring

成功時は空文字列です. エラーメッセージは翻訳されます.

dataobject

今回の照会結果オブジェクトです.

data.idstring

認証されたアカウントの ID です. 10 進 ID 文字列で返します.

data.display_namestring

アカウントの表示名です.

data.created_atstring | null

作成時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.

data.regionstring | null

アカウントの地域. 過去データで不明なら null です.

data.localestring | null

アカウントの言語設定です. 今回の応答言語とは限りません. 不明または対象外の場合は null です.

data.account_typestring

normal はメインアカウント, sub はサブアカウントです.

レスポンス例

{
  "code": 0,
  "message": "",
  "data": {
    "id": "7",
    "display_name": "Example User",
    "created_at": "2026-10-01T00:00:00Z",
    "region": "global",
    "locale": "zh",
    "account_type": "normal"
  }
}