enrollmentTokens

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

Changed on

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.

Request

Path parameters

enterpriseIdstring required

Required. The ID of the enterprise.

Request body

durationstring google-duration

[Optional] The length of time the enrollment token is valid, ranging from 1 minute to Durations.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).

enrollmentTokenType'enrollmentTokenTypeUnspecified' | 'userlessDevice' | 'userDevice'

[Required] The type of the enrollment token.

tokenstring

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.

Response

Successful response

durationstring google-duration

[Optional] The length of time the enrollment token is valid, ranging from 1 minute to Durations.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).

enrollmentTokenType'enrollmentTokenTypeUnspecified' | 'userlessDevice' | 'userDevice'

[Required] The type of the enrollment token.

tokenstring

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.

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status