Page Summary
-
This method, part of the EnrollmentTokensService, is used to create an enrollment token for an enterprise.
-
The request requires authorization with the
https://www.googleapis.com/auth/androidenterprisescope. -
The request body includes fields like
enrollmentTokenType(required),duration(optional for the token's validity), andgoogleAuthenticationOptions(optional for controlling Google authentication during enrollment). -
The response body mirrors the request body structure and includes the generated read-only
tokenvalue.
Creates an enrollment token for the enterprise. This method is part of the EnrollmentTokensService.
Request
HTTP request
POST https://www.googleapis.com/androidenterprise/v1/enterprises/ enterpriseId /enrollmentTokens
Parameters
enterpriseId
string
Authorization
This request requires authorization with the following scope:
| Scope |
|---|
https://www.googleapis.com/auth/androidenterprise
|
For more information, see the authentication and authorization page.
Request body
In the request body, supply data with the following structure:
{ "kind": "androidenterprise#enrollmentToken", "token": string , "enrollmentTokenType": string , "duration": { "seconds": long , "nanos": integer }, "googleAuthenticationOptions": { "authenticationRequirement": string , "requiredAccountEmail": string } }
kind
string
token
string
enrollmentTokenType
string
Acceptable values are:
- "
enrollmentTokenTypeUnspecified" - "
userDevice" - "
userlessDevice"
duration
nested object
duration.
seconds
long
googleAuthenticationOptions
nested object
googleAuthenticationOptions.
authenticationRequirement
string
GoogleAuthenticationSettings
for the enterprise resource
when devices are enrolled with this token.Acceptable values are:
- "
authenticationRequirementUnspecified" - "
optional" - "
required"
googleAuthenticationOptions.
requiredAccountEmail
string
AuthenticationRequirement
must be set to REQUIRED
if this field is set.Response
If successful, this method returns a response body with the following structure:
{ "kind": "androidenterprise#enrollmentToken", "token": string , "enrollmentTokenType": string , "duration": { "seconds": long , "nanos": integer }, "googleAuthenticationOptions": { "authenticationRequirement": string , "requiredAccountEmail": string } }
kind
string
token
string
enrollmentTokenType
string
Acceptable values are:
- "
enrollmentTokenTypeUnspecified" - "
userDevice" - "
userlessDevice"
duration
nested object
duration.
seconds
long
googleAuthenticationOptions
nested object
googleAuthenticationOptions.
authenticationRequirement
string
GoogleAuthenticationSettings
specified for the enterprise resource is ignored for devices enrolled with this token.Acceptable values are:
- "
authenticationRequirementUnspecified" - "
optional" - "
required"
googleAuthenticationOptions.
requiredAccountEmail
string
AuthenticationRequirement
must be set to REQUIRED if this field is set.

