สร้างบัญชีบริการ
โปรแกรมสำรวจ 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 และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[null,null,["อัปเดตล่าสุด 2023-12-02 UTC"],[[["Use the APIs Explorer to directly interact with the Android Management API."],["To 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."],["Securely store the generated public/private key pair for your service account as it is the only copy and crucial for API access."],["Optionally, enhance project security by granting the \"Owner\" role to existing project members for additional oversight."]]],["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"]]