Quick Start

Get started with DotPassport SDK in 5 minutes.

Step 1: Install the SDK

npm install @dotpassport/sdk

Step 2: Get Your API Key

  1. Navigate to the API Keys section

  2. Generate a new API key

  3. Copy your key (starts with live_ or test_)

circle-exclamation

Step 3: Initialize the Client

import { DotPassportClient } from '@dotpassport/sdk';

const client = new DotPassportClient({
  apiKey: process.env.DOTPASSPORT_API_KEY
});

Step 4: Fetch User Data

Step 5: Add a Widget (Optional)

Add a reputation widget to your web page:

circle-check

Next Steps

Complete Example

Here's a complete example with error handling:

Common Issues

API Key Not Working

Make sure your API key:

  • Starts with live_ or test_

  • Is stored securely (environment variables)

  • Has not expired

  • Has the correct permissions

User Not Found (404 Error)

The Polkadot address may:

  • Not exist in the system

  • Be formatted incorrectly

  • Not have any reputation data yet

Rate Limit Exceeded (429 Error)

You've hit your API rate limit. Consider:

  • Caching responses

  • Upgrading your API tier

  • Implementing request throttling

See Rate Limitingarrow-up-right for more information.

Last updated