Skip to content

API Keys

API keys provide server-to-server authentication for the Islamic Open Finance™ API.

Key Types

TypePrefixUsage
Secret Keyiof_sk_Server-side only
Publishable Keyiof_pk_Client-side (limited access)
Test Keyiof_sk_test_Sandbox environment

Creating API Keys

Via Dashboard

  1. Navigate to SettingsAPI Keys
  2. Click Create New Key
  3. Select permissions and scopes
  4. Copy and securely store the key

Via API

typescript
const apiKey = await iof.apiKeys.create({
  name: "Production Server",
  permissions: ["contracts:read", "contracts:write"],
  expiresAt: new Date("2025-12-31"),
});

console.log(apiKey.secretKey); // iof_sk_live_...

Using API Keys

Include the key in the Authorization header:

bash
curl https://api.islamicopenfinance.com/v1/contracts \
  -H "Authorization: Bearer iof_sk_live_abc123..."

Or with the SDK:

typescript
import { IslamicOpenFinance } from "@iof/sdk";

const iof = new IslamicOpenFinance({
  apiKey: process.env.IOF_API_KEY,
});

Key Permissions

ScopeDescription
contracts:readRead contract data
contracts:writeCreate/update contracts
kyc:readRead KYC data
kyc:writeSubmit KYC verifications
billing:readView billing information
admin:*Full administrative access

Security

  • Keys are only shown once at creation
  • Rotate keys regularly (recommended: every 90 days)
  • Use different keys for different environments
  • Monitor key usage in the dashboard

Next Steps

Licensed under the Apache License 2.0