สร้างบัญชีบริการ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โปรแกรมสำรวจ API ช่วยให้คุณเรียกใช้ Android Management API ได้โดยตรง หากต้องการเรียก API จากเซิร์ฟเวอร์ คุณต้องเปิดใช้ Android Management API สำหรับโปรเจ็กต์และสร้างบัญชีบริการ
เปิดใช้ Android Management API
เปิดใช้ Android Management API สำหรับโปรเจ็กต์
ลงชื่อเข้าใช้ Google API Console
เลือกหรือสร้างโปรเจ็กต์
ไปที่หน้าโปรเจ็กต์
คลิกเปิดใช้ API
ค้นหาและเลือก Android Management API ในไลบรารี API
ไปที่หน้าไลบรารี API
คลิกเปิดใช้
สร้างบัญชีบริการ
ลงชื่อเข้าใช้ Google API Console
เปิดหน้าข้อมูลเข้าสู่ระบบ
หากได้รับข้อความแจ้ง ให้เลือกโปรเจ็กต์ที่เปิดใช้ Android Management API
คลิกสร้างข้อมูลเข้าสู่ระบบ > คีย์บัญชีบริการ
เลือกบัญชีบริการใหม่จากเมนูแบบเลื่อนลง ป้อนชื่อบัญชีบริการ
เลือกประเภทคีย์ที่ต้องการ แล้วคลิกสร้าง ระบบจะสร้างคู่คีย์สาธารณะ/ส่วนตัวใหม่และดาวน์โหลดลงในเครื่อง ซึ่งเป็นสำเนาเดียวของคีย์นี้ คุณมีหน้าที่เก็บรักษาไว้อย่างปลอดภัย
เปิดหน้า IAM เมื่อระบบแจ้งให้เลือก ให้เลือกโปรเจ็กต์ที่เปิดใช้ Android Management API
คลิกเพิ่ม
เพิ่มบัญชีบริการที่คุณเพิ่งสร้างเป็นสมาชิก และเลือกบทบาทผู้ใช้การจัดการ Android
คลิกบันทึก
(ไม่บังคับ แต่แนะนำอย่างยิ่ง) เพิ่มเจ้าของโปรเจ็กต์รายอื่นโดยมอบบทบาทเจ้าของให้กับสมาชิกปัจจุบันของโปรเจ็กต์
บทบาทและสิทธิ์
หากต้องการเข้าถึง Android Management API บัญชีบริการของคุณต้องมีสิทธิ์ androidmanagement.enterprises.manage
ซึ่งสามารถรับได้จากบทบาทผู้ใช้การจัดการ Android (หรือ roles/androidmanagement.user
)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eUse the APIs Explorer to directly interact with the Android Management API.\u003c/p\u003e\n"],["\u003cp\u003eTo call the API from a server, enable the Android Management API for your Google Cloud project and create a service account with the "Android Management User" role.\u003c/p\u003e\n"],["\u003cp\u003eSecurely store the generated public/private key pair for your service account as it is the only copy and crucial for API access.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, enhance project security by granting the "Owner" role to existing project members for additional oversight.\u003c/p\u003e\n"]]],["To use the Android Management API, first enable it in the Google API Console by selecting your project and enabling it. Then, create a service account by generating a new key pair. Next, assign the \"Android Management User\" role to the service account in the IAM page. The service account needs the `androidmanagement.enterprises.manage` permission, granted by the role. Optionally, add project owners with the Owner role.\n"],null,["# Create a service account\n\nThe\n[APIs explorer](https://developers.google.com/apis-explorer/#p/androidmanagement/v1/)\nallows you to call Android Management API directly. To call the API from a\nserver, you need to enable Android Management API for your project and create a\nservice account.\n\nEnable the Android Management API\n---------------------------------\n\nEnable the Android Management API for your project.\n\n1. Sign in to the Google API Console.\n\n2. Select or create a project.\n\n [Go to the Projects Page](https://console.cloud.google.com/project)\n3. Click **Enable API**.\n\n4. Search for and select **Android Management API** in the API library.\n\n [Go to the API Library Page](https://console.cloud.google.com/apis/library)\n5. Click **Enable**.\n\nCreate your service account\n---------------------------\n\n1. Sign in to the Google API Console.\n\n2. Open the\n [Credentials page](https://console.developers.google.com/project/_/apiui/credential).\n If prompted, select the project that has the Android Management API enabled.\n\n3. Click **Create credentials** \\\u003e **Service account key**.\n\n4. From the dropdown menu, select **New service account**. Enter a name for\n your service account.\n\n5. Select your preferred key type and click **Create**. Your new public/private\n key pair is generated and downloaded to your machine and is the only copy of\n this key. You are responsible for storing it securely.\n\n6. Open the [IAM page](https://console.developers.google.com/iam-admin/iam). If\n prompted, select the project that has the Android Management API enabled.\n\n7. Click **Add**.\n\n8. Add the service account you've just created as member and select the role\n **Android Management User**.\n\n9. Click **Save**.\n\n10. (Optional, but highly recommended) Add additional project owners by\n [granting the Owner role](https://cloud.google.com/iam/docs/managing-policies#access_control_via_console)\n to existing project members.\n\nRoles and permissions\n---------------------\n\nTo access the Android Management API your service account requires the\n`androidmanagement.enterprises.manage` permission, which can be granted by the\n**Android Management User** role (or `roles/androidmanagement.user`)."]]