Menghapus beberapa akun secara massal. Untuk akun yang gagal dihapus, info error akan disertakan dalam respons. Metode ini mengabaikan akun yang tidak ada atau diduplikasi dalam permintaan.
Metode ini memerlukan kredensial Google OAuth 2.0 dengan izin yang sesuai.
Permintaan HTTP
POST https://identitytoolkit.googleapis.com/v1/projects/{targetProjectId}/tenants/{tenantId}/accounts:batchDelete
Jika tenantId ditentukan, ID project Google Cloud tempat tenant Identity Platform berada. Jika tidak, ID project Google Cloud yang menjadi milik akun.
Otorisasi memerlukan izin IAM berikut pada resource targetProjectId yang ditentukan:
firebaseauth.users.delete
tenantId
string
Jika akun tersebut milik tenant Identity Platform, ID tenant. Jika akun termasuk dalam project Identity Platform default, kolom ini tidak diperlukan.
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
Representasi JSON
{"localIds": [string],"force": boolean}
Kolom
localIds[]
string
Wajib. Daftar ID pengguna yang akan dihapus.
force
boolean
Apakah akan memaksa penghapusan akun yang tidak dalam status dinonaktifkan. Jika salah, hanya akun yang dinonaktifkan yang akan dihapus, dan akun yang tidak dinonaktifkan akan ditambahkan ke errors.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-03-04 UTC."],[[["\u003cp\u003eThis API method facilitates the batch deletion of multiple user accounts, ignoring non-existent or duplicate accounts specified in the request.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful deletions return a response body, while errors for specific accounts are included in the same response; only disabled accounts will be deleted unless the \u003ccode\u003eforce\u003c/code\u003e field is \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe method uses a POST request to a specific URL, which includes parameters for \u003ccode\u003etargetProjectId\u003c/code\u003e and \u003ccode\u003etenantId\u003c/code\u003e, with \u003ccode\u003etargetProjectId\u003c/code\u003e being the ID of the project the accounts belong to and \u003ccode\u003etenantId\u003c/code\u003e the ID of the tenant, if applicable.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be in JSON format, including a list of user IDs (\u003ccode\u003elocalIds\u003c/code\u003e) to be deleted and an optional boolean \u003ccode\u003eforce\u003c/code\u003e field that will determine if it will delete non-disabled accounts.\u003c/p\u003e\n"],["\u003cp\u003eProper authorization is required, using a Google OAuth 2.0 credential with specified IAM permissions and one of three listed OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.tenants.accounts.batchDelete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nBatch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response. The method ignores accounts that do not exist or are duplicated in the request.\n\nThis method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control).\n\n### HTTP request\n\n`POST https://identitytoolkit.googleapis.com/v1/projects/{targetProjectId}/tenants/{tenantId}/accounts:batchDelete`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [BatchDeleteAccountsResponse](/identity-platform/docs/reference/rest/v1/BatchDeleteAccountsResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/identitytoolkit`\n- `\n https://www.googleapis.com/auth/firebase`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]