重要提示:我们不再接受 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 |
已废弃。
|
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-27。
[null,null,["最后更新时间 (UTC):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. | |"]]