App Keys

This guide shows how to manage your App Keys using Virgil CLI.

Create new app key

This command is used to create new App Key for current application:

virgil app key create --app_id <App ID> <App Key Name>

Example 1. Alice creates an App Key for her existing E2EE application:

> virgil app key create --app_id 429958e13...d64f5efc43 MyAppKey
This secret is only shown ONCE. Make note of it and store it in a safe, secure location.
App Key: MCowBQYDK2VwAyEAP...2P9DpGm41Kb5a1r2AU=
App Key ID: cb39332c94cb81d2829046ade57881da

Example 2. Alice creates an App Key for her existing E2EE application without specifying its name in the command:

> virgil app key create --app_id 429958e13...d64f5efc43
Enter App Key name:
> MyAppKey
This secret is only shown ONCE. Make note of it and store it in a safe, secure location.
App Key: MCowBQYDK2VwAyEAP...2P9DpGm41Kb5a1r2AU=
App Key ID: cb39332c94cb81d2829046ade57881da

Delete app key

This command is used to delete App Key:

virgil app key delete --app_id <App ID> <App Key ID>

Example: Alice deletes her existing App Key:

> virgil app key delete --app_id 429958e13...d64f5efc43 d158a31c...9033bf289c
App key delete ok.

List app keys

This command is used to print list of all App Keys for the specified application:

virgil app key list --app_id <App ID>

Example: Alice looks at all App keys she currently has for her application:

> virgil app key list --app_id 429958e13...d64f5efc43

|          App key name   |                      App Key ID   |                                                     PublicKey  |         Created at
|-------------------------|-----------------------------------|----------------------------------------------------------------|---------------------------------------
|               MyAppKey |  cb39332c94cb81d2829046ade57881da |   MCowBQYDK2VwAyEAPJr3xzWFfPH6lM+ZehvNDwXaD2P9DpGm41Kb5a1r2AU= | 2019-11-06 12:52:49.953 +0000 UTC
|                 newkey1 |  e6cc033fa48f2214d175baab1cb07d56 |   MCowBQYDK2VwAyEA5Ids7TVq7ff8BAAxkTohIW28Jm1PXsocVmUDZtJzEMo= | 2019-11-08 13:15:23.883 +0000 UTC

Update app key

This command is used to update name of an App Key:

virgil app key update --app_id <App ID> <App Key ID>

Example: Alice changes the name of her App Key:

> virgil app key update --app_id 429958e13...d64f5efc43 cb39332c94cb81d2829046ade57881da
Enter new App Key name:
> CoolestAppKey
Key successfully updated