Skip to main content

Installation and configuration

This guide helps you install the Truvity API client and ensures your environment meets the required system specifications.

System requirements​

Before you install the Truvity SDK, make sure your system meets these requirements:

  • Node.js version 16.16 or later. Download it from the official Node.js website.
  • Operating systems: macOS, Windows, or Linux

Ensure that your environment meets these requirements to avoid compatibility issues.

Obtain API key​

Before using the API, you need to obtain the API key to authenticate calls. Follow the Create API keys guide to create a new API key.

Install the SDK​

The SDK installation instructions depend on the SDK language you want to use.

Use the npm command to install the TypeScript SDK:

npm install @truvity/sdk

Package link on npm.

Create the API client​

To begin using the API, you first need to create a new API client. Use the following code to set up the client:

import { TruvityClient } from "@truvity/sdk";

const client = new TruvityClient({
apiKey: "YOUR_API_KEY",
});

Where YOUR_API_KEY is the API key you obtained in the previous step.

This code initializes a new client for the Truvity API, which makes API calls to Truvity Cloud.

Make API calls​

Once you set up the API client, use API methods to perform actions with the available API operations.

For example, to create a new API key, use the following code:

await client.apiKeys.apiKeyCreate({
idempotencyKey: "7da7a728-f910-11e6-942a-68f728c1ba70",
body: {}
});

Next steps​

Now that you have installed the SDK, you are ready to start building your first app using the Truvity SDK. Here are some recommended next steps to help you get started:

1. Explore the quick start guide​

The Quick start guide is the best place to begin after installing the SDK. It demonstrates key operations such as issuing credentials and interacting with wallet data.

2. Review API documentation​

For detailed information on the available API endpoints, parameters, and response formats, check out the API reference. The API documentation provides code samples in multiple languages to help you integrate the SDK into your app seamlessly.

3. Start building​

Once you gone through the Quick Start Guide, you are ready to begin building your first app.

  • Explore the Credential lifecycle section and go through step-by-step guides through the process of creating, issuing, sharing and verifying credentials and presentations.

4. Explore advanced features​

Once you are comfortable with the basics, you can dive into more advanced features of the SDK, such as:

Further reading​