Learn how to authenticate with the RealmKit API using API keys, OAuth 2.0, or JWT tokens. Choose the method that best fits your use case.
Most common authentication method for API access
Authorization: Bearer your-api-key-hereSimple token-based authentication for server-to-server integrations
Backend services, automation scripts, CI/CD pipelines
Standard OAuth flow for web applications and user authentication
Web applications, mobile apps, third-party integrations
Temporary session tokens from web interface login
Web interface, temporary access, development testing
Create, manage, and secure your API keys
rk_live_1234567890abcdef1234567890abcdefrk_live_ for production or rk_test_ for testingControl what your API keys can access
read:realmsRead realm metadata and listings
download:realmsDownload realm templates
write:realmsCreate and update realms
delete:realmsDelete owned realms
read:statsAccess platform statistics
read:profileRead user profile information
write:profileUpdate user profile
Implementation examples in popular languages
curl "https://api.realmkit.com/v1/realms" \
-H "Authorization: Bearer your-api-key-here"// Using fetch
const response = await fetch('https://api.realmkit.com/v1/realms', {
headers: {
'Authorization': 'Bearer your-api-key-here',
'Content-Type': 'application/json'
}
});
// Using the official SDK
import { RealmKit } from '@realmkit/sdk';
const client = new RealmKit({
apiKey: 'your-api-key-here'
});
const realms = await client.realms.list();# Using requests
import requests
headers = {
'Authorization': 'Bearer your-api-key-here',
'Content-Type': 'application/json'
}
response = requests.get('https://api.realmkit.com/v1/realms', headers=headers)
# Using the official SDK
from realmkit import RealmKit
client = RealmKit(api_key='your-api-key-here')
realms = client.realms.list()// Using net/http
req, _ := http.NewRequest("GET", "https://api.realmkit.com/v1/realms", nil)
req.Header.Set("Authorization", "Bearer your-api-key-here")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
// Using the official SDK
import "github.com/realmkit/go-sdk"
client := realmkit.New("your-api-key-here")
realms, err := client.Realms.List(context.Background())Common authentication issues and solutions
Missing, invalid, or expired authentication credentials.
Valid authentication but insufficient permissions.
Too many requests in a given timeframe.