Lưu ý quan trọng: Chúng tôi không còn chấp nhận các lượt đăng ký mới cho Play EMM API.
Tìm hiểu thêm.
Enterprises: createWebToken
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về một mã thông báo duy nhất để truy cập vào giao diện người dùng có thể nhúng. Để tạo một
giao diện người dùng web, hãy chuyển mã thông báo đã tạo vào javascript Managed Google Play
API. Bạn chỉ có thể dùng mỗi mã thông báo để bắt đầu một phiên giao diện người dùng. Xem
Tài liệu về API JavaScript để biết thêm thông tin.
Yêu cầu
Yêu cầu HTTP
POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/createWebToken
Thông số
Tên thông số |
Giá trị |
Mô tả |
Tham số đường dẫn |
enterpriseId |
string |
Mã doanh nghiệp.
|
Ủy quyền
Yêu cầu này cần được cho phép có phạm vi sau:
Phạm vi |
https://www.googleapis.com/auth/androidenterprise |
Để biết thêm thông tin, hãy xem trang xác thực và uỷ quyền.
Nội dung yêu cầu
Trong nội dung yêu cầu, hãy cung cấp dữ liệu theo cấu trúc sau:
{
"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
}
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
permission[] |
list |
Không dùng nữa. Sử dụng PlaySearch.approveApps . |
|
parent |
string |
URI của khung chính lưu trữ iframe. Để ngăn XSS, iframe có thể không được lưu trữ tại các URI khác. URI này phải là https. Sử dụng khoảng trắng để phân tách nhiều URI mẹ. |
|
playSearch |
nested object |
Các tuỳ chọn hiển thị trang ứng dụng Tìm kiếm trên Play được quản lý. |
|
playSearch.enabled |
boolean |
Liệu trang ứng dụng Tìm kiếm trên Play được quản lý có hiển thị hay không. Mặc định là đúng. |
|
playSearch.approveApps |
boolean |
Cho phép truy cập vào iframe trong chế độ phê duyệt. Mặc định là sai. |
|
privateApps |
nested object |
Tuỳ chọn hiển thị trang Ứng dụng riêng tư. |
|
privateApps.enabled |
boolean |
Liệu trang Ứng dụng riêng tư có hiển thị hay không. Mặc định là đúng. |
|
webApps |
nested object |
Các tuỳ chọn để hiển thị trang Ứng dụng web. |
|
webApps.enabled |
boolean |
Liệu trang Ứng dụng web có được hiển thị hay không. Mặc định là đúng. |
|
storeBuilder |
nested object |
Các tuỳ chọn hiển thị trang Sắp xếp ứng dụng. |
|
storeBuilder.enabled |
boolean |
Liệu trang Sắp xếp ứng dụng có hiển thị hay không. Mặc định là đúng. |
|
managedConfigurations |
nested object |
Các tuỳ chọn để hiển thị trang Cấu hình được quản lý. |
|
managedConfigurations.enabled |
boolean |
Liệu trang Cấu hình được quản lý có hiển thị hay không. Mặc định là đúng. |
|
kind |
string |
|
|
zeroTouch |
nested object |
Các tuỳ chọn hiển thị trang Không chạm. |
|
zeroTouch.enabled |
boolean |
Liệu giao diện người dùng nhúng tự động có thể sử dụng với mã thông báo này hay không. Nếu bạn bật chế độ này, quản trị viên có thể liên kết khách hàng tự động đăng ký với doanh nghiệp này. |
|
Phản hồi
Nếu thành công, phương thức này sẽ trả về nội dung phản hồi có cấu trúc như sau:
{
"kind": "androidenterprise#administratorWebToken",
"token": string
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
token |
string |
Mã thông báo mờ cần được truyền đến giao diện người dùng của Play để tạo iframe. |
|
kind |
string |
|
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-09-10 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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` | | |"]]