CLI Enrollment with IonicTools

Prerequisites

You need an Ionic account.

Enrolling using IonicTools

IonicTools is available on Linux, Windows and OSX.

Download IonicTools

  1. Download the Ionic Tools package from the Ionic Downloads page
  2. Unzip package, and navigate to appropriate binary directory

Create Profile

The easiest way to create a new profile, is to use ionic-profiles with email authentication.

Windows

ionic-profiles.exe create ^
    --enrollment-method email ^
    --persistor plaintext ^
    --keyspace HVzG ^
    --es-url https://dev-enrollment.ionic.com/keyspace/HVzG/le/5640bb430ea2684423e0655c/default/register

Linux and OSX

Only if you are running on Ubuntu, you may need to install curl:

sudo apt update && sudo apt install -y libcurl4-openssl-dev
./ionic-profiles create \
    --enrollment-method email \
    --persistor plaintext \
    --keyspace HVzG \
    --es-url https://dev-enrollment.ionic.com/keyspace/HVzG/le/5640bb430ea2684423e0655c/default/register

To complete the process, follow prompts to authenticate with email:

Enter email address: dev@ionic.com

A Registration Code has been sent to your email.
Enter Registration Code: I.ABCDEFGHIJKLM

Create a name for this profile: 
MyProfile
[SUCCESS] Saved ionic profile HVzG.4.2085f2d4-fc7b-4bb5-bfdf-12cddbe11aa6

Save Test Profile

The commands above will create a plaintext profile in your home directory at ~/.ionicsecurity/profiles.pt. If you open the file, you will see a profile that looks similiar to the test profile shown below:

{
  "activeDeviceId":"HVzG.5.59175f63-559c-467e-9542-21038c789f30",
  "profiles": [
    {
      "deviceId":"HVzG.5.59175f63-559c-467e-9542-21038c789f30",
      "aesCdEiKey":"785a7c71be4c54ca000ccd070f1477b383593d2fc0349b06115b0d718deb688e",
      "aesCdIdcKey":"1d054811266dd5e530b6d3bdb7bbb6d92af6af3a1d72fd7832b6856219bf320d",
      "creationTimestamp":1516223989,
      "name":"TestProfile",
      "server":"https://dev-api.ionic.com"
    }
  ]
}

We recommend you save this test profile to ${HOME}/.ionicsecurity/test-profiles.pt. This will be referenced in the tutorials as the “test profile”.

Next Step:

Next, continue to developing an application or following a tutorial using your new profile!