---
title: "POST /androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens"
method: POST
path: "/androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens"
tags: ["enrollmentTokens"]
---

# POST /androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens

`POST /androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens`

Returns a token for device enrollment. The DPC can encode this token within the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-device API to authenticate the user. The token can be generated for each device or reused across multiple devices.

## Path parameters

- `enterpriseId` string, required

## Request body

- EnrollmentToken — A token used to enroll a device.
  - `enrollmentTokenType` 'enrollmentTokenTypeUnspecified' | 'userlessDevice' | 'userDevice' — [Required] The type of the enrollment token.
  - `googleAuthenticationOptions` EnrollmentTokenGoogleAuthenticationOptions — Options for Google authentication during the enrollment.
    - `authenticationRequirement` 'authenticationRequirementUnspecified' | 'optional' | 'required' — [Optional] Specifies whether user should authenticate with Google during enrollment. This setting, if specified,`GoogleAuthenticationSettings` specified for the enterprise resource is ignored for devices enrolled with this token.
    - `requiredAccountEmail` string — [Optional] Specifies the managed Google account that the user must use during enrollment.`AuthenticationRequirement` must be set to`REQUIRED` if this field is set.
  - `token` string — The token value that's passed to the device and authorizes the device to enroll. This is a read-only field generated by the server.
  - `duration` string, google-duration — [Optional] The length of time the enrollment token is valid, ranging from 1 minute to [`Durations.MAX_VALUE`](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), approximately 10,000 years. If not specified, the default duration is 1 hour. In the JSON REST API, this is represented as a string (e.g., `3600s`).

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/androidenterprise.md) · [All operations](https://skmtc.net/google/apis/androidenterprise/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/androidenterprise/versions/abd3cdac0580/schema)
