Join the first wave of early adopters
Location-BasedAutomationMade Simple
Build powerful location-aware applications with our comprehensive SDK. Trigger actions, send notifications, and engage users based on their real-world location.
OMX SDK
npm install omx-sdk
Create GeoTrigger
1import { createOmxClient } from 'omx-sdk';
2
3const omx = createOmxClient({
4 clientId: process.env.OMX_CLIENT_ID,
5 secretKey: process.env.OMX_SECRET_KEY
6});
7
8try {
9 const geoTrigger = await omx.geoTrigger.create({
10 name: "Coffee Shop Promo",
11 location: {
12 lat: 43.6532,
13 lng: -79.3832
14 },
15 radius: 100,
16 onEnter: {
17 notification: {
18 title: "Welcome!",
19 body: "Get 30% off your order!"
20 }
21 }
22 });
23
24 console.log('GeoTrigger created:', geoTrigger.id);
25} catch (error) {
26 console.error('Failed to create GeoTrigger:', error.message);
27}