Quickstart

This page shows you how to get started with the Android Management API.
Follow the steps below and use
APIs explorer
to enroll an enterprise, create a policy, and provision a device.

In order to use this quickstart guide, you need:

A new or factory reset Android 6.0+ device.

A Gmail account. This account cannot be associated with an existing enterprise.

To select or create a Cloud Platform project that you own or can edit. Take
note of the project ID.
Go to the Projects Page

Generate a sign-up URL

Note: EMMs already using the Google Play EMM API can follow these steps for testing purposes only.
In a production environment, existing EMM partners must use the Google Play EMM
to create enterprises. For more information, see the guide for existing EMM partners.

Before you can create an enterprise, you first need to generate a sign-up URL by
calling signupUrls.create. Use the button below to send the
request using the APIs Explorer. Ensure the following parameters are specified:

The value field in the response contains the enrollment token. You can provision
a device by entering the enrollment token manually or by scanning a QR code
containing the token and other provisioning settings. The token expires after
one hour by default. To change the expiration period, set duration to a
different value.

Generate a QR code

For testing, you can use an online QR code generator to convert the qrcode
string returned in the response into a QR code. When pasting the string, make
sure to remove all escape '\' characters. There are numerous QR code generators
available online, including
Zxing.
To use Zxing:

Select Text from the Contents dropdown menu.

Paste the qrcode into the Text content field. Remember to remove all
escape '\' characters from the string.

Click Generate to generate the QR code.

Provision a device

For Android 7.0+ devices

Turn on a new or factory-reset device.

Tap the same spot on the welcome screen six times to enter QR code mode.

Enter your Wi-Fi details.

Scan the QR code that you generated. The device is now set up with Android Management.

For Android 6.0+ devices

Turn on a new or factory-reset device.

Follow the setup wizard and enter your Wi-Fi details.

When prompted to sign in, enter afw#setup.

Tap Next, and then accept the installation of Android Device Policy.

Scan the QR code that you generated or enter the enrollment token manually.
The device is now set up with Android Management.

Next steps

Cleanup (optional)

1. Deprovision a device

Before you can deprovision a device, you need the device's deviceId. To get a
list of all your provisioned devices, call enterprises.devices.list. Use the
button below to send the request using the APIs Explorer. Ensure the following
parameter is specified:

parent: The enterprise name in the form of enterprises/{enterprise-id}.