Install & Initialize SDK on the Server Side
The next step is to install the Virgil SDKThe SDK helps take tedious complexity out of coding by providing APIs for all of Virgil Services., in your chosen language, on the server. Developers must install the Virgil SDK on the server side in order to sign user Virgil Cards. This creates a trusted relationship between the your Application and each user's card.
The first step is to install the SDK for your platform.
The next step is to ensure you have created a developer account and first application.
For server side initialization we need to pass in a few details:
- The access tokenA string that is needed to modify and read the app's settings more ... for your application
- The application credentialsA necessary app-attribute that authorizes a developer to use the application.
- The App IDThis is an identifier, which uniquely identifies an Application at Virgil Services more ...
- The App KeyThis is a secure Private Key for your application that you receive during registration at Virgil Services more ... in a file
- The App Key passwordA password set for an App Key that you receive during application registration at Virgil Services
let url = Bundle.main.url(forResource: "[YOUR_APP_KEY_FILENAME_HERE],
let appPrivateKeyData = try! Data(contentsOf: url)
let credentials = VSSCredentials(appKeyData: appPrivateKeyData,
appKeyPassword: "[YOUR_APP_KEY_PASSWORD_HERE]", appId: "[YOUR_APP_ID_HERE]")
let context = VSSVirgilApiContext(crypto: nil,
token: "[YOUR_ACCESS_TOKEN_HERE]", credentials: credentials,
let virgil = VSSVirgilApi(context: context)