Creating Global Card
This guide will demonstrate how to create a . The main feature of Global Virgil Cards is that these Cards contain an identity, which must be confirmed by a user or device. For these cases, Virgil Security has a Virgil Identity Service that is responsible for the validation of user identities. Validating a user only occur after another service - Virgil RA Services authorizes the creation of Global Virgil Cards.
For original information about the Global Virgil Card check out our Virgil Card Service endpoint.
After a Global Virgil Card's creation, it's published at the Virgil Card Service, where an owner can find their Cards at any time.
You can not change a Global Virgil Card's content after its publishing.
Each Virgil Card contains a permanent digital signature that provides data integrity for the Virgil Card over its life-cycle.
Let's start to create a Global Virgil Card
Set up your project environment before you begin to create a Global Virgil Card, with the getting started guide.
The Global Virgil Card creation procedure is shown in the figure below.
In order to create a Global Virgil Card:
- Developers need to initialize the
- Once the SDK is ready we can proceed to the next step:
- Generate and save the (it's also necessary to enter the Virgil Key's name and password).
- Create a Global Virgil Card using their recently generated Virgil Key (they will need to enter some identifying information).
# generate a Virgil Key
alice_key = virgil.keys.generate()
# save the Virgil Key into storage
# create a Global Virgil Card
alice_card = virgil.cards.create_global(
The Virgil Key will be saved into default device storage. Developers can also change the Virgil Key storage directory as needed, during Virgil SDK initialization.
Virgil doesn't keep a copy of your Virgil Key. If you lose a Virgil Key, there is no way to recover it.
- Now, developers can initiate an identity verification process.
- A User has to confirm a Virgil Card's identity using a received by email.
See our Virgil Identity Service typical workflow for an email confirmation here
- Finally, developers must publish the User's Global Virgil Card on Virgil Services.
# initiate identity verification process
attempt = alice_card.check_identity
# confirm an identity and grab the validation token
token = attempt.confirm(VirgilIdentity::EmailConfirmation.new("[CONFIRMATION_CODE]"))
# publish the Virgil Card