Skip to content

API Keys & Authentication

Learn how to get your API key and authenticate your requests to Inodra's APIs.

Getting Your API Key

1. Create an Account

Sign up for a free Inodra account at inodra.com.

2. Select or Create a Project

API keys belong to projects, which are tied to specific Sui networks:

  1. Navigate to Projects in your dashboard
  2. Select an existing project or create a new one
  3. Choose the network (Mainnet or Testnet) for your project

Learn more about Projects and how to organize your resources.

3. Generate an API Key

  1. Navigate to API Keys in the sidebar
  2. Ensure the correct project is selected in the header dropdown
  3. Click Generate New API Key
  4. Give your key a descriptive name (e.g., "Production App", "Development")
  5. Copy your API key and store it securely

Note: API keys are project-specific. A key generated for a Mainnet project will only work with Mainnet endpoints.

⚠️ Keep your API key secure! Never commit API keys to version control or expose them in client-side code.

4. API Key Format

Your API key will look like this:

indr_AbCdEf123456789...

All Inodra API keys start with the indr_ prefix.

Authentication

Include your API key in the x-api-key header for all requests:

JSON-RPC Authentication

bash
curl -X POST https://api.inodra.com/v1/jsonrpc \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"sui_getLatestCheckpointSequenceNumber","params":[]}'

GraphQL Authentication

bash
curl -X POST https://api.inodra.com/v1/graphql \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"query": "{ checkpoints(first: 10) { nodes { sequenceNumber } } }"}'

gRPC Authentication

Primary:

go
ctx := metadata.AppendToOutgoingContext(context.Background(), "x-api-key", "YOUR_API_KEY")
response, err := client.GetLatestCheckpoint(ctx, &GetLatestCheckpointRequest{})

Fallback:

go
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer YOUR_API_KEY")

REST API Authentication

bash
curl -H "x-api-key: YOUR_API_KEY" \
     https://api.inodra.com/v1/checkpoints

Managing API Keys

Viewing Keys

In your dashboard, you can:

  • View all your API keys
  • See last used timestamps
  • Monitor usage statistics per key

Rotating Keys

For security best practices:

  1. Generate a new API key
  2. Update your applications to use the new key
  3. Delete the old key once migration is complete

Revoking Keys

If a key is compromised:

  1. Go to your dashboard
  2. Find the compromised key
  3. Click Delete to immediately revoke access

Organizations & Teams

Creating Organizations

Organizations allow you to:

  • Share API keys with team members
  • Manage billing centrally
  • Set usage limits per team

Inviting Team Members

  1. Go to Organizations in your dashboard
  2. Click Invite Members
  3. Enter email addresses
  4. Assign roles (Admin or Member)

Role Permissions

  • Admin: Full access to billing, keys, and team management
  • Member: Can create and manage API keys, view usage statistics

Testing Your Setup

Verify your API key works:

bash
# Test with a simple checkpoint query
curl -X POST https://api.inodra.com/v1/jsonrpc \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sui_getLatestCheckpointSequenceNumber",
    "params": []
  }'

Expected response:

json
{
  "jsonrpc": "2.0",
  "result": "12345678",
  "id": 1
}

Common Issues

Invalid API Key

  • Error: 401 Unauthorized
  • Solution: Check that your API key is correct and active

Missing Header

  • Error: 401 Unauthorized
  • Solution: Ensure you're including the x-api-key header

Rate Limit Exceeded

  • Error: 429 Too Many Requests
  • Solution: Reduce frequency or batch requests

Next Steps

Released under the MIT License.