Enterprises: createWebToken
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลโทเค็นที่ไม่ซ้ำกันเพื่อเข้าถึง UI ที่ฝังได้ วิธีสร้าง
UI ของเว็บ ให้ส่งต่อโทเค็นที่สร้างขึ้นไปยัง JavaScript ของ Managed Google Play
API โทเค็นแต่ละรายการจะใช้เพื่อเริ่มเซสชัน UI ได้ 1 เซสชันเท่านั้น โปรดดู
เพื่อดูข้อมูลเพิ่มเติมในเอกสาร JavaScript API
ส่งคำขอ
คำขอ HTTP
POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/createWebToken
พารามิเตอร์
ชื่อพารามิเตอร์ |
ค่า |
คำอธิบาย |
พารามิเตอร์เส้นทาง |
enterpriseId |
string |
รหัสขององค์กร
|
การให้สิทธิ์
คำขอนี้ต้องได้รับการให้สิทธิ์ตามขอบเขตต่อไปนี้
ขอบเขต |
https://www.googleapis.com/auth/androidenterprise |
สำหรับข้อมูลเพิ่มเติม โปรดดูที่หน้าการตรวจสอบสิทธิ์และการให้สิทธิ์
เนื้อหาของคำขอ
ในเนื้อหาคำขอ ให้ข้อมูลในโครงสร้างต่อไปนี้
{
"kind": "androidenterprise#administratorWebTokenSpec",
"permission": [
string
],
"parent": string,
"playSearch": {
"enabled": boolean,
"approveApps": boolean
},
"privateApps": {
"enabled": boolean
},
"webApps": {
"enabled": boolean
},
"storeBuilder": {
"enabled": boolean
},
"managedConfigurations": {
"enabled": boolean
},
"zeroTouch": {
"enabled": boolean
}
}
ชื่อพร็อพเพอร์ตี้ |
ค่า |
คำอธิบาย |
หมายเหตุ |
permission[] |
list |
เลิกใช้งานแล้ว ใช้ PlaySearch.approveApps |
|
parent |
string |
URI ของเฟรมหลักที่โฮสต์ iframe เพื่อป้องกัน XSS คุณอาจไม่โฮสต์ iframe ที่ URI อื่น URI นี้ต้องเป็น https ใช้ช่องว่างเพื่อแยก URI หลักหลายรายการ |
|
playSearch |
nested object |
ตัวเลือกสำหรับการแสดงหน้าแอป Managed Play Search |
|
playSearch.enabled |
boolean |
แสดงหน้าแอป Managed Play Search หรือไม่ ค่าเริ่มต้นเป็น True |
|
playSearch.approveApps |
boolean |
อนุญาตการเข้าถึง iframe ใน โหมดอนุมัติ ทั้งนี้ ระบบตั้งค่าเริ่มต้นไว้ที่ false |
|
privateApps |
nested object |
ตัวเลือกสำหรับการแสดงหน้าแอปส่วนตัว |
|
privateApps.enabled |
boolean |
แสดงหน้าแอปส่วนตัวหรือไม่ ค่าเริ่มต้นเป็น True |
|
webApps |
nested object |
ตัวเลือกสำหรับการแสดงหน้าเว็บเว็บแอป |
|
webApps.enabled |
boolean |
แสดงหน้าเว็บแอปหรือไม่ ค่าเริ่มต้นเป็น True |
|
storeBuilder |
nested object |
ตัวเลือกสำหรับการแสดงหน้าจัดระเบียบแอป |
|
storeBuilder.enabled |
boolean |
แสดงหน้าจัดระเบียบแอปหรือไม่ ค่าเริ่มต้นเป็น True |
|
managedConfigurations |
nested object |
ตัวเลือกสำหรับการแสดงหน้าการกำหนดค่าที่มีการจัดการ |
|
managedConfigurations.enabled |
boolean |
แสดงหน้าการกำหนดค่าที่มีการจัดการหรือไม่ ค่าเริ่มต้นเป็น True |
|
kind |
string |
|
|
zeroTouch |
nested object |
ตัวเลือกสำหรับการแสดงหน้าการตั้งค่าอุปกรณ์พร้อมใช้แบบรวมกลุ่ม |
|
zeroTouch.enabled |
boolean |
กำหนดว่า UI แบบฝังที่มีอุปกรณ์พร้อมใช้แบบรวมกลุ่มใช้กับโทเค็นนี้หรือไม่ หากเปิดใช้ ผู้ดูแลระบบจะลิงก์ลูกค้าที่มีการตั้งค่าอุปกรณ์พร้อมใช้แบบรวมกลุ่มกับองค์กรนี้ได้ |
|
คำตอบ
หากสำเร็จ เมธอดนี้จะแสดงเนื้อหาการตอบกลับซึ่งมีโครงสร้างต่อไปนี้
{
"kind": "androidenterprise#administratorWebToken",
"token": string
}
ชื่อพร็อพเพอร์ตี้ |
ค่า |
คำอธิบาย |
หมายเหตุ |
token |
string |
โทเค็นทึบแสงที่จะส่งไปยังฟรอนท์เอนด์ของ Play เพื่อสร้าง iframe |
|
kind |
string |
|
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-10 UTC
[null,null,["อัปเดตล่าสุด 2024-09-10 UTC"],[[["\u003cp\u003eGenerates a unique token for accessing an embeddable UI for managing Google Play apps in an enterprise.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body allows customization of which pages are displayed in the UI, such as Play Search, Private Apps, and Web Apps.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes an opaque token to be used with the managed Google Play javascript API to generate the UI iframe.\u003c/p\u003e\n"],["\u003cp\u003eThe token is single-use and intended for one UI session only.\u003c/p\u003e\n"]]],[],null,["# Enterprises: createWebToken\n\n| **Note:** Requires [authorization](#auth).\n\nReturns a unique token to access an embeddable UI. To generate a\nweb UI, pass the generated token into the managed Google Play javascript\nAPI. Each token may only be used to start one UI session. See the\n[JavaScript API documentation](https://developers.google.com/api-client-library/javascript/apis/androidenterprise/v1) for further information.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/createWebToken\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|---------------------------|\n| **Path parameters** |||\n| `enterpriseId` | `string` | The ID of the enterprise. |\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/androidenterprise` |\n\nFor more information, see the [authentication and authorization](/android/work/play/emm-api/v1/how-tos/authorizing) page.\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```text\n{\n \"kind\": \"androidenterprise#administratorWebTokenSpec\",\n \"permission\": [\n string\n ],\n \"parent\": string,\n \"playSearch\": {\n \"enabled\": boolean,\n \"approveApps\": boolean\n },\n \"privateApps\": {\n \"enabled\": boolean\n },\n \"webApps\": {\n \"enabled\": boolean\n },\n \"storeBuilder\": {\n \"enabled\": boolean\n },\n \"managedConfigurations\": {\n \"enabled\": boolean\n },\n \"zeroTouch\": {\n \"enabled\": boolean\n }\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------------------------|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `permission[]` | `list` | Deprecated. Use `PlaySearch.approveApps`. | |\n| `parent` | `string` | The URI of the parent frame hosting the iframe. To prevent XSS, the iframe may not be hosted at other URIs. This URI must be https. Use whitespaces to separate multiple parent URIs. | |\n| `playSearch` | `nested object` | Options for displaying the managed Play Search apps page. | |\n| playSearch.`enabled` | `boolean` | Whether the managed Play Search apps page is displayed. Default is true. | |\n| playSearch.`approveApps` | `boolean` | Allow access to the iframe in [approve mode](https://developers.google.com/android/work/play/emm-api/managed-play-iframe#render). Default is false. | |\n| `privateApps` | `nested object` | Options for displaying the Private Apps page. | |\n| privateApps.`enabled` | `boolean` | Whether the Private Apps page is displayed. Default is true. | |\n| `webApps` | `nested object` | Options for displaying the Web Apps page. | |\n| webApps.`enabled` | `boolean` | Whether the Web Apps page is displayed. Default is true. | |\n| `storeBuilder` | `nested object` | Options for displaying the Organize apps page. | |\n| storeBuilder.`enabled` | `boolean` | Whether the Organize apps page is displayed. Default is true. | |\n| `managedConfigurations` | `nested object` | Options for displaying the Managed Configuration page. | |\n| managedConfigurations.`enabled` | `boolean` | Whether the Managed Configuration page is displayed. Default is true. | |\n| `kind` | `string` | | |\n| `zeroTouch` | `nested object` | Options for displaying the Zero Touch page. | |\n| zeroTouch.`enabled` | `boolean` | Whether zero-touch embedded UI is usable with this token. If enabled, the admin can link zero-touch customers to this enterprise. | |\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": \"androidenterprise#administratorWebToken\",\n \"token\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|---------------------------------------------------------------------------|-------|\n| `token` | `string` | An opaque token to be passed to the Play front-end to generate an iframe. | |\n| `kind` | `string` | | |"]]