TypeScript SDK

Acquire API Keys

Acquire API Keys for the Shelby RPC, Aptos Node API, and Aptos Indexer APIs

API Keys

API keys authenticate your app and manage rate limits when using Shelby services. Without one, your client runs in "anonymous" mode with much lower limits, which can affect performance.

Overview

API keys provide several important benefits:

  • Authentication: Securely identify your application to Shelby services.
  • Rate Limiting: Access higher request limits for better application performance.
  • Usage Tracking: Monitor your API consumption and optimize usage patterns.
  • Service Access: Enable access to premium features and enhanced service tiers.

Acquiring API Keys

To obtain your API keys, you'll need to create an API resource through the Geomi platform:

Step-by-Step Guide

Visit geomi.dev in your web browser.

Account Setup

Log in to your existing account or create a new account if you haven't already.

Create API Resource

On the overview page, click the "API Resource" card to begin creating a new resource.

Configure Resource

Complete the configuration form with the following settings:

  • Network: Select Shelbynet from the available network options.
  • Resource Name: Provide a descriptive name for your API resource.
  • Usage Description: Briefly describe your intended use case.

Generate Keys

Once submitted, your API keys will be generated and displayed.

Note: By default the site generates a key for use in a private server context. If you intend to use the key in a frontend context, create a client key.

Learn more about API keys at the Geomi API keys and billing pages.

Implementing API Keys

Basic Configuration

Integrate your API key into the Shelby client configuration as shown below:

import { Network } from "@aptos-labs/ts-sdk";
import { ShelbyNodeClient } from "@shelby/sdk";

const client = new ShelbyNodeClient({
  network: Network.SHELBYNET,
  apiKey: "aptoslabs_***", // Replace with your actual API key
});

Or into an Aptos client:

import { Network, AptosConfig, Aptos } from "@aptos-labs/ts-sdk";

const aptosConfig = new AptosConfig({
 network: Network.SHELBYNET,
 clientConfig : {
  API_KEY: "aptoslabs_***", // Replace with your actual API key
 }
})
const aptosClient = new Aptos(aptosConfig)