Getting started
Get started with the MantaHQ SDK to manage your data easily. This guide walks you through authenticating your project and installing the core library.
Prerequisites
Before you begin, ensure you have the following:
- A MantaHQ Account: Create your account here.
- Node.js: We recommend the latest LTS version.
1. Generate an API key
To authorize communication between the SDK and your project, you must create a dedicated API key.
- Log in to your MantaHQ Dashboard.
- In the sidebar navigation, click API Keys.
- Click New API Key.
- Enter a descriptive name for your key.
- Copy and store the generated key immediately.
2. Technical setup
Follow these steps to integrate the SDK into your development environment.
Install the SDK
Install the package using your preferred package manager.
- npm
- yarn
npm
npm i mantahq-sdk
yarn
yarn add mantahq-sdk
Initialize the Client
Initialize the client using the API key you generated in the previous step.
TypeScript
import { MantaClient } from "mantahq-sdk";
// Use environment variables to protect your key
const manta = new MantaClient({
sdkKey: "manta_sk_live_xxxx", // Replace with your actual API key
});
Next steps
You are now ready to use the MantaHQ SDK. Depending on your project requirements, choose one of the following paths:
- Connect your data: Learn how to Connect a Postgres Database or use Manta data Tables.
- Execute queries: Start Fetching Data or run Raw SQL Queries for complex operations.