Method: users.insert
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat pengguna.
Panggilan mutasi yang dilakukan segera setelah pembuatan pengguna terkadang dapat gagal karena pengguna tidak sepenuhnya dibuat karena penundaan propagasi di backend kami. Periksa detail error untuk pesan "Pembuatan pengguna tidak selesai" untuk melihat apakah hal ini terjadi. Dalam kasus ini, mencoba ulang panggilan setelah beberapa saat dapat membantu.
Jika resolveConflictAccount
ditetapkan ke true
, kode respons 202
berarti ada akun tidak terkelola yang bentrok dan diundang untuk bergabung dengan organisasi. Kode respons 409
berarti ada akun yang bentrok sehingga pengguna tidak dibuat berdasarkan opsi menangani akun pengguna yang tidak dikelola yang dipilih.
Permintaan HTTP
POST https://admin.googleapis.com/admin/directory/v1/users
URL menggunakan sintaksis gRPC Transcoding.
Parameter kueri
Parameter |
resolveConflictAccount |
boolean
Opsional. Jika ditetapkan ke true , opsi yang dipilih untuk menangani akun pengguna yang tidak dikelola akan diterapkan. Default: false
|
Isi permintaan
Isi permintaan memuat instance User
.
Isi respons
Jika berhasil, isi respons memuat instance User
yang baru dibuat.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/admin.directory.user
Untuk mengetahui informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[],[],null,["# Method: users.insert\n\nCreates a user.\n\nMutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the \"User creation is not complete\" message to see if this is the case. Retrying the calls after some time can help in this case.\n\nIf `resolveConflictAccount` is set to `true`, a `202` response code means that a conflicting unmanaged account exists and was invited to join the organization. A `409` response code means that a conflicting account exists so the user wasn't created based on the [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) option selected.\n\n### HTTP request\n\n`POST https://admin.googleapis.com/admin/directory/v1/users`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resolveConflictAccount` | `boolean` Optional. If set to `true`, the option selected for [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) will apply. Default: `false` |\n\n### Request body\n\nThe request body contains an instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.directory.user`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]