OMX Logo
Core SDK

Core Module & Authentication

Learn how to initialize the OMX SDK and authenticate your requests safely.

Core Module

Build with confidence

The OMX Core module is the foundation of the SDK. it handles authentication, client initialization, and provides common communication utilities used by all other modules.

Getting Your API Keys

1

Sign up for an OMX account

Create your business account in the console

2

Navigate to API Keys

Find the API Keys section in your dashboard

3

Generate Credentials

Get your Client ID and Secret Key

SDK Initialization

Core initialization
All modules require an initialized Core client to handle authentication and communication.
typescript
1import { createOmxClient } from 'omx-sdk';
2
3// Initialize the core client
4const omx = createOmxClient({
5 clientId: 'your_client_id',
6 secretKey: 'your_secret_key'
7});
8
9// All subsequent calls through this instance are fully authenticated
10const triggers = await omx.geoTrigger.list();

Core Client Methods

omx.makeRequest()
Perform a custom authenticated HTTP request to the OMX platform.
typescript
1const data = await omx.makeRequest('/your-endpoint', {
2 method: 'POST',
3 body: JSON.stringify({ key: 'value' })
4});
Configuration Accessors
Access the client's current configuration properties.
typescript
1console.log(omx.clientId);
2console.log(omx.baseUrl);
Rate Limiting
OMX implements rate limiting to ensure fair usage across all users.
Standard Plan

1,000

requests per minute

Pro Plan

5,000

requests per minute

Enterprise Plan

Custom

requests per minute

Security Best Practices
Never expose API keys in client-side code
Use environment variables for key storage
Rotate API keys regularly
Monitor API usage and set up alerts