This guide aims to get you up and running and familiar with the API in about 15 minutes. We'll teach you how to setup your first user and how to create your first item.

Get the Meeco CLI

Download the Meeco CLI and follow the installation instructions in the Meeco CLI section of the documentation.

The first thing to do after setup is to create an .environment.yaml file that allows you to connect to the sandbox environment.

  url: https://sandbox.meeco.me/vault
  url: https://sandbox.meeco.me/keystore

Create a User

Create your first user - let's call them "Alice".

meeco users:create -p supersecretpassword > .alice.yaml

The command above does a lot, if you want to learn what happens behind the scenes look at the guide about Setting up Access. The end result is captured in a file .alice.yaml that holds the necessary information about the user that allows us to talk to the API in the next steps.

In the next calls, you'll see an argument added with -a .alice.yaml

Login as a User

You can use the following command to login as the user you just created or if you are returning to a session. This command will re-create the tokens if they are expired. It outputs an Authorization config file for use with future commands.

meeco users:login -a .alice.yaml

Get info about a User

You can also get the information about a user by using the following command. This command will return the user's id and other user info like their dek.

meeco users:get -a .alice.yaml

Creating an Item

Items in the Meeco API require you to specify a template. This template can be seen as a contract with a number of predefined fields (which we call slots). To get all available templates execute the following command

meeco templates:list -a .alice.yaml
Fetching available templates... done
kind: Templates
  - passport_details
  - vehicle
  - bank_card
  - certificate_diploma
  - membership_subscription
  - pet
  - device
  - password
  - important_document
  - travel
  - services
  - medical
  - custom

Let's create a vehicle item. To prepare this we can run the create config command

First, let's have a look at what kind of information the template holds.

meeco templates:info vehicle -a .alice.yaml
Fetching template 'vehicle'... done
kind: Template
  id: 0c385f1d-8825-4932-a6ab-846178b816e4
  name: vehicle
  description: null
  ordinal: 1
  visible: true
  user_id: null
  updated_at: 2020-09-10T14:13:12.029Z
  image: https://sandbox.meeco.me/vault/images/ff1c25e9-530a-4103-b649-986631bcb448
    - 8670d4c6-8d68-49a4-bd21-0fc8cefa705d
  slot_ids: []
  label: Vehicle
  background_color: null
  slots: []

Then, create the config file:

meeco items:create-config vehicle -a .alice.yaml > .item-config.yaml

The next step is to edit the file to contain some data.

kind: Item
  template_name: vehicle
  label: "DeLorean"
    - name: purchase_date
      value: "01/01/1981"
    - name: type
      value: "Sports Car"
    - name: vin
      value: "123456789"
    - name: licence_plate
      value: "1AAA999"
    - name: model_make
      value: "DMC DeLorean"
    - name: power
      value: "132 PS"

Based on this configuration, we can create a new vehicle in Alice's digital vault.

meeco items:create -i .item-config.yaml -a .alice.yaml > .item.yaml

Congratulations, you have now created your first item in the Vault.

From here you can either keep learning about the Meeco Platform and tools, or jump into the Connections and Sharing tutorial to keep using the CLI to make a connection with another user and share the item you created above.

Last updated