コンテンツにスキップ
Docs
Esc
↑↓移動↵開く⌘Jプレビュー

CLIのログインを始め、承認用のコードを発行する

POST/cli/device-codes
リクエストボディ
必須application/json
cli_versionstring必須
最小長 1 · 最大長 32
client_namestring必須

CLIが判定した実行元(例: Claude Code・Cursor・terminal)。承認画面に表示する。

最小長 1 · 最大長 64
レスポンス
200

device_code はCLIだけが持ち、user_code と承認URLを利用者に示す。期限は expires_in 秒。

device_codestring必須
user_codestring必須

XXXX-XXXX 形式。

verification_uristring<uri>必須
verification_uri_completestring<uri>必須
expires_ininteger必須
intervalinteger必須
400

invalid_input。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
request_idstring必須
429

rate_limited。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
request_idstring必須
500

internal。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
request_idstring必須
リクエスト
curl -X POST 'https://api.cozeni.net/external/v1/cli/device-codes' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "cli_version": "string",
  "client_name": "string"
}'
レスポンス
{
  "device_code": "string",
  "user_code": "string",
  "verification_uri": "http://example.com",
  "verification_uri_complete": "http://example.com",
  "expires_in": 0,
  "interval": 0
}

このページは役に立ちましたか?