مهم: ما دیگر ثبت نام های جدید برای Play EMM API را نمی پذیریم.
بیشتر بدانید .
Enterprises: createWebToken
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک توکن منحصر به فرد برای دسترسی به یک رابط کاربری قابل جاسازی را برمی گرداند. برای ایجاد رابط کاربری وب، رمز تولید شده را به API جاوا اسکریپت مدیریت شده Google Play منتقل کنید. هر نشانه فقط برای شروع یک جلسه رابط کاربری قابل استفاده است. برای اطلاعات بیشتر به اسناد 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 | گزینههایی برای نمایش صفحه برنامههای جستجوی مدیریتشده Play. | |
playSearch. enabled | boolean | صفحه برنامههای جستجوی مدیریتشده Play نمایش داده میشود یا خیر. پیش فرض درست است. | |
playSearch. approveApps | boolean | اجازه دسترسی به iframe در حالت تأیید را بدهید. پیش فرض نادرست است. | |
privateApps | nested object | گزینه هایی برای نمایش صفحه برنامه های خصوصی. | |
privateApps. enabled | boolean | آیا صفحه برنامه های خصوصی نمایش داده می شود یا خیر. پیش فرض درست است. | |
webApps | nested object | گزینه هایی برای نمایش صفحه برنامه های وب. | |
webApps. enabled | boolean | اینکه آیا صفحه برنامه های وب نمایش داده می شود یا خیر. پیش فرض درست است. | |
storeBuilder | nested object | گزینه هایی برای نمایش صفحه سازماندهی برنامه ها. | |
storeBuilder. enabled | boolean | آیا صفحه سازماندهی برنامه ها نمایش داده می شود یا خیر. پیش فرض درست است. | |
managedConfigurations | nested object | گزینه هایی برای نمایش صفحه پیکربندی مدیریت شده. | |
managedConfigurations. enabled | boolean | آیا صفحه پیکربندی مدیریت شده نمایش داده می شود یا خیر. پیش فرض درست است. | |
kind | string | | |
zeroTouch | nested object | گزینه هایی برای نمایش صفحه Zero Touch. | |
zeroTouch. enabled | boolean | اینکه آیا رابط کاربری تعبیه شده با لمس صفر با این نشانه قابل استفاده است یا خیر. اگر فعال باشد، سرپرست میتواند مشتریان بدون لمس را به این شرکت پیوند دهد. | |
پاسخ
در صورت موفقیت آمیز بودن، این روش یک بدنه پاسخ با ساختار زیر را برمی گرداند:
{
"kind": "androidenterprise#administratorWebToken",
"token": string
}
نام ملک | ارزش | توضیحات | یادداشت ها |
---|
token | string | یک نشانه مات که باید به قسمت جلویی Play ارسال شود تا یک iframe ایجاد شود. | |
kind | string | | |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-13 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-13 بهوقت ساعت هماهنگ جهانی."],[[["\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` | | |"]]