重要資訊:我們目前不接受新的 Play EMM API 註冊。
瞭解詳情。
Enterprises: generateSignupUrl
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
產生註冊網址。
要求
HTTP 要求
POST https://www.googleapis.com/androidenterprise/v1/enterprises/signupUrl
參數
參數名稱 |
值 |
說明 |
選用查詢參數 |
adminEmail |
string |
選用設定。用於在企業註冊表單中預先填入管理員欄位的電子郵件地址。這個值僅是提示,可由使用者變更。如果 `allowedDomains` 非空白,則此值必須屬於其中一個 `allowedDomains`。 |
allowedDomains |
string |
選用設定。允許管理員電子郵件使用的網域清單。IT 管理員無法輸入網域名稱不在這個清單中的電子郵件地址。系統不允許使用這份清單中的網域子網域,但如果在網域名稱前方加上「*.」前置字元 (例如 *.example.com),則可新增第二個項目。如果沒有這個欄位,或是該欄位是空白清單,IT 管理員可以自由使用任何有效的網域名稱。個人電子郵件網域一律允許,但會導致 Google Play 管理版帳戶企業建立。
|
callbackUrl |
string |
管理員成功建立企業後,系統會將其重新導向至這個回呼網址。在重新導向至該網址之前,系統會在這個網址中加入一個名為「enterpriseToken」的查詢參數,其中包含用於 CompleteSignup 要求的不明確權杖。
請注意,這表示系統會剖析網址、新增參數,然後再格式化新的網址,也就是說,系統可能會進行一些輕微的格式變更,更重要的是,網址必須是正確格式,才能進行剖析。
|
授權
這項要求需要下列範圍的授權:
範圍 |
https://www.googleapis.com/auth/androidenterprise |
詳情請參閱「驗證和授權」頁面。
要求主體
請勿透過此方法提供要求主體。
回應
如果成功的話,這個方法會傳回回應內文,其結構如下:
{
"kind": string,
"url": string,
"completionToken": string
}
屬性名稱 |
值 |
說明 |
附註 |
url |
string |
管理員可透過這個網址註冊企業。系統無法在 iframe 中轉譯所指向的頁面。 |
|
completionToken |
string |
這是需要的非透明權杖,可與企業權杖搭配使用,從 CompleteSignup 取得企業資源。 |
|
kind |
string |
已淘汰。
|
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-27 (世界標準時間)。
[null,null,["上次更新時間:2025-03-27 (世界標準時間)。"],[[["\u003cp\u003eGenerates a sign-up URL for Android enterprise enrollment using the \u003ccode\u003esignupUrl\u003c/code\u003e endpoint with an optional admin email and callback URL.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful signup, a response provides a sign-up URL for the admin and a completion token for finalizing the process with the \u003ccode\u003eCompleteSignup\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope is necessary to use this endpoint.\u003c/p\u003e\n"]]],[],null,["# Enterprises: generateSignupUrl\n\n| **Note:** Requires [authorization](#auth).\n\nGenerates a sign-up URL.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/androidenterprise/v1/enterprises/signupUrl\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Optional query parameters** |||\n| `adminEmail` | `string` | Optional. Email address used to prefill the admin field of the enterprise signup form. This value is a hint only and can be altered by the user. If \\`allowedDomains\\` is non-empty then this must belong to one of the \\`allowedDomains\\`. |\n| `allowedDomains` | `string` | Optional. A list of domains that are permitted for the admin email. The IT admin cannot enter an email address with a domain name that is not in this list. Subdomains of domains in this list are not allowed but can be allowed by adding a second entry which has \\`\\*.\\` prefixed to the domain name (e.g. \\*.example.com). If the field is not present or is an empty list then the IT admin is free to use any valid domain name. Personal email domains are always allowed, but will result in the creation of a managed Google Play Accounts enterprise. |\n| `callbackUrl` | `string` | The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named \"enterpriseToken\" which will contain an opaque token to be used for the CompleteSignup request. Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed. |\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\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": string,\n \"url\": string,\n \"completionToken\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|-------------------|----------|------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `url` | `string` | A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe. | |\n| `completionToken` | `string` | An opaque token that will be required, along with the Enterprise Token, for obtaining the enterprise resource from CompleteSignup. | |\n| `kind` | `string` | Deprecated. | |"]]