Box Developerドキュメント
最新バージョン

ユーザーを削除

delete
https://api.box.com/2.0
/users/:user_id

このエンドポイントはバージョン2024.0です。引き続き使用するために 変更は必要ありません。詳細については、 **Box APIのバージョン管理**を参照してください。

ユーザーを削除します。デフォルトでは、ユーザーがまだコンテンツを所有している状態では失敗します。削除を実行する前にユーザーが所有するコンテンツを移動するか、forceフィールドを使用してユーザーとそのユーザーが所有するファイルを削除してください。

リクエスト

bearer [ACCESS_TOKEN]
application/json

パスパラメータ

stringパス内必須
12345

ユーザーのID。

クエリパラメータ

booleanクエリ内省略可能
true

Whether the user should be deleted even if this user still own files.

booleanクエリ内省略可能
true

Whether the user will receive email notification of the deletion.

レスポンス

none

ユーザーを削除して空のレスポンスを返します。

予期しないクライアントエラー。

delete
ユーザーを削除
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

cURL
curl -i -X DELETE "https://api.box.com/2.0/users/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.users.deleteUserById(user.id);
Python Gen
client.users.delete_user_by_id(user.id)
.NET Gen
await client.Users.DeleteUserByIdAsync(userId: user.Id);
Java
BoxUser user = new BoxUser(api, "0");
user.delete(false, false);
Python
user_id = '33333'
client.user(user_id).delete(force=True)
.NET
await client.UsersManager.DeleteEnterpriseUserAsync("44444", notify: false, force: true);
Node
// Delete the user even if they still have files in their account
client.users.delete('123', {force: true})
    .then(() => {
        // deletion succeeded — no value returned
    });